OLPC runs Processing and Arduino

At NYU’s ITP program, the Processing and Arduino programming environments are widely used. Since my main interest in the OLPC is to use it as a controller for projects, and since most of my projects are built using those two tools, I was very interested in getting them running on the OLPC.

In addition, both Processing and Arduino are projects that have a lot in common with the OLPC project: they are focused on education, focus on making computing technology available to groups that previously would have found it difficult, are fully Open Sourced, and rely on a community-based approach to support and development.

OLPC rocks Processing and Arduino

Good news: it is strikingly easy (with caveats). The Arduino IDE runs under Sugar (the OLPC’s built-in user interface) and under XFCE (a more conventional Linux window manager). Processing runs fine (albeit slowly) under XFCE. However, it gets confused under Sugar, which doesn’t handle multiple windows well.

Read past the break for instructions!

The Processing and Arduino development environments are based on the same underlying technology, so a lot of the installation is very similar. You will first install Java, then make a few adjustments so that Processing and Arduino can find it.

If you are interested in installing the Arduino environment, follow Brian Jepson’s instructions here. Once you’ve done that, installing Processing is as simple as downloading and decompressing a single file. Follow Brian’s instructions, then skip ahead to the section called “Installing Processing”.

Installing Java

Follow the instructions for installing Java from the OLPC Wiki. Note that you should follow those instructions exactly, and use Java version jre1.5.0_13. Don’t use version 6, it does not seem to work.

Once done with that, you will add a couple of lines to a file called .bashrc in your home directory. These will allow Arduino and Processing to find the Java installation on your system.

From a terminal window, do:

cd /home/olpc
nano .bashrc

Add the following two lines to the end of the file:

export JAVA_HOME=/usr/java/jre1.5.0_13/
export PATH=$PATH:$JAVA_HOME/bin

Save the file by exiting nano with ctrl-x, confirming that you want to save changes. Close the terminal session.

Installing Processing

As I mentioned before, you should really install an alternative window manager such as XFCE before trying to use Processing. If you have done that, then all you really need to do is download the compressed Processing archive, and decompress it.

Open a terminal window, and type:

cd /home/olpc
tar xvfz  processing-0135.tgz

You can delete the processing-0135.tgz file once you’re done. To run Processing:

cd processing-0135

That’s all! Text and graphics functions seem to work fine. OpenGL is very slow, as can be expected. I have not had much luck with audio and video functions, but will keep trying to figure it out. Being able to use the built-in OLPC camera and microphone would be very handy.

5 comments to OLPC runs Processing and Arduino

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>