leJOS on the Raspberry Pi

Running leJOS on the Raspberry Pi as a Linux host is straightforward.

What I want to do is use the RPi as a greatly enhanced Lego NXT running leJOS.

To do this I have added an Arduino Uno and a nxshield-D, and some Lipo batteries and charger and a voltage regulator.

The RPi talks to the Arduino by i2c, which in turn uses i2c to talk to the nxshield.

This allows the RPi to drive all Lego NXT peripherals.

There is no firmware as the RPi runs an OpenJDK JVM.

A modified classes.jar is used.

This project is currently on hold waiting for another RPi from RS Components.

This entry was posted in robotics. Bookmark the permalink.

3 Responses to leJOS on the Raspberry Pi

  1. Juan Antonio Breña Moral says:

    Good morning, I read your post and it is a fantastic idea. Do you have a Image about your project? I could like to collaborate on it.

  2. Daniel Sendula says:

    Quite interesting project. Only thing I am not 100% sure is why you needed Arduino Uno between NXShield and RPi? Can’t RPi communicate directly with NXShield?

    Also, you can check pi4j where i2c is implemented in Java – maybe that can help further porting of leJOS to RPi… 🙂

    • Geek Grandad says:

      Thanks, I will look at pi4j. I have not worked on this project for a while as I have been concentrating on my home automation stuff. I might not end up using the Arduino, but there are several advantages to it. Firstly, I do not know whether the NXShield will generate 5v signals that will damage the RPi. If this is the case, I would need at least a level converter. I think a first step might be trying the NXShield with an Arduino Due, as a port of leJOS to the Due is probably possible, and this would confirm whether the shield works with 3,3v signals or not. Another issue is that the NXShield attaches neatly to an Arduino but not a Raspberry Pi. There might also be advantages in the secondary real-time Arduino processor. The NXT Mindstorms using a secondary AVR processor for some sensor and motor control, and there might be advantages in this set up. I will get back to the project soon, unless I get completely sidetracked on a Due port of leJOS.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s