doc-helmut wrote:
So it must be possible to access 1 robot' s motor by motor(1, 70) even if it's programmed in Java.
It's nothing more or less than cut down the classes and methods of all robotic packs down to 1 simple (but universal) instance.
Well you can already do something not that far from that with...
Motor.A.forward() or Motor.A.rotate(70)... Which is a little more verbose but arguably easier to understand. But the problem is that if you want to use these commands you will eventually want to use arrays and other structured types (such as classes), which means you will have to deal with the OO nature of Java.
Will it not be possible for a Lejos developer to cut all the objects and methods down to simple functions and procedures?
Yes I'm sure it is possible. But the problem is who would want to do it? All of the leJOS developers are probably leJOS developers because they like Java, and OO. They are unlikely to be interested in removing the objects etc...
edit: or write a ANSI C-parser that uses the LeJos firmware?
There are many alternate languages that target the JVM (and so use Java byte code, and in theory could generate code that runs on the leJOS firmware). The problem is that most of them are even more OO than Java... However there are few ansi c implementations see:
http://en.wikipedia.org/wiki/Java_Virtu ... _compilers
But you will still then have the problem of how to use a set of classes/libraries, that have been written assuming an OO model and language from a language that does not support OO...