On Saturday 13 June 2009 08:25:51 jim wrote:
> The Lego robotics kit http://en.wikipedia.org/wiki/Lego_NXT uses an
> AT91SAM7S256 (ARM7TDMI) processor. How much work would be involved in
> porting Android to the Lego controller? The Lego NXT obviously won't
> make a cell phone, but it does have Bluetooth and I can imagine some
> network applications using the Lego controller as a cheap hardware
> controller, possibly sharing code with Android communication
> devices.
>
> I'm familiar enough with the Android SDK to want to use it (though
> there is a Java ME implementation for Lego,
> http://en.wikipedia.org/wiki/LeJOS), but ignorant about hardware and
> porting. Is it possible to estimate how big a job this would be, and the
> chances of running into
> unforeseen difficulties? TIA!
I am the person that did most of the low level of porting of Lejos to Lego
NXT.
There is basically a HAL layer (drivers etc) + a small JVM + bunch of higher
level Java libraries. These are all sandpapered code and the whole HAL+JVM
fits into about 45k of flash. Being small is very important because the NXT
only has 256k flash + 64k RAM.
You could just use that HAL layer for any other Lego NXT porting (and the Lego
OSEK project did this).
I did once discuss the idea putting Dalvik on this device( ie Lejos - JVM +
Dalvik), but was told that Dalvik is too big for this.
I have not looked at the spec for Dalvik, but I expect that a minimalist
Dalvik interpreter would be bigger than the Lejos JVM. Further, any android
libraries would need to be rewritten to fit.
You can run Java code on Lejos, and it comes with some very interesting
examples. The Java code has to be pretty tight to achieve RAM/flash
limitations.
There is also a an alternative to do something like link an android phone via
Bluetooth and make a hybrid system. ie. Use the phone's sensors + networking
and run more sophisticated robotics algorithms ("vision",...) on the phone
then send steering commands to the NXT platform via bluetooth.
-- Charles
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---