Gary Edwards

Arduino and Processing on Fedora

written on 11 November 2011

This should be a simple task for most users, but it made me a bit crazy, messing with links and package versions, so I thought I would make this howto.

This was done on Fedora, but may work with other distros.

Install Arduino

In fedora this is easy:

$ sudo yum install arduino

Make sure your system is up to date, there are sometimes bugs in the AVR packages that get picked up and fixed.

Edit your boards.txt if required. For my Arduino ADK board I need to pull in a custom boards.txt from the Arduino ADK page:

$ cd /etc/arduino/
$ sudo mv boards.txt boards.txt.bk
$ sudo unzip ~/Downloads/boards.txt.zip

Install Processing

Download the latest version of Processing.

Open a terminal and navigate to the /opt directory:

$ cd /opt

Extract the processing file to this directory:

$ sudo tar xf ~/Downloads/processing-*-linux.tgz

Set up menu shortcuts and add Processing to path:

$ sudo ln -s processing-1.5.1/ processing
$ sudo ln -s /opt/processing/processing /usr/local/bin/processing

$ cd processing
$ sudo wget http://www.edwards.je/static/files/processing.png

$ cd /usr/share/applications/
$ sudo wget http://www.edwards.je/static/files/processing.desktop

Now you have to link some rxrx files, as the ones that come with Processing are a bit out of date and do not work:

$ cd /opt/processing-1.5.1/modes/java/libraries/serial/library

$ sudo rm RXTXcomm.jar
$ sudo ln -s /usr/share/java/RXTXcomm.jar

$ cd linux32/
$ sudo rm librxtxSerial.so
$ sudo ln -s /usr/lib/rxtx/librxtxSerial.so

Set up correct file permisions:

$ sudo chown -R root:root /opt/processing*

If your Arduino shows up as /dev/ttyACM0, Processing will not see it.

You will need to create a symlink to a name that it will be looking for:

$ sudo ln -s /dev/ttyACM0 /dev/ttyS8

Processing library

Now you should be good to go!

However, if you would like to make your life easier, I would recommend installing the Processing Library for Arduino, which uses Firmata to talk to Arduino.

Download the lastest version of the library.

Change directory to your Processing sketchbook location (set on first run).

Create a "libraries" directory if it does not exist and navigate to it:

$ mkdir libraries
$ cd libraries/

Now extract the downloaded library to this directory:

$ unzip ~/Downloads/processing-arduino.zip

For some reason the library is distributed with a typo in one of the file name, to fix this rename it:

$ mv arduino/library/Arduino.jar arduino/library/arduino.jar

Upload some of the Firmata examples to your Arduino and check out the Arduino examples in Processing.

Processing and Arduino environments should now be working and talking to each other!

This entry was tagged adk, arduino, firmata, howto, linux, mega and processing