Installing Arduino and Eclipse on Xubuntu 10.04 LTS

There is a whole lot of information on the internet about using the Arduino with Eclipse on Xubuntu 10.04 LTS, much of it out of date. Here I document my experience in the hope that this process becomes more smooth.

I followed documentation from a couple of very key people, which helped a lot. Still, there are certain issues that threw me off. I have added my experiences where I had issues. The Arduino IDE is the standard method to connect to and program the Arduino. It is simple to use. If you want a more rich programming environment you can also use Eclipse, with the Arduino plugin. Either method can be used to program and run the Arduino. Here are the steps:

  1. Download the Arduino IDE, install and test
  2. Download and install Eclipse, configure
  3. While in Eclipse, download the Arduino plugin, configure and test.

My little Arduino is so cute, as cute as a microprocessor can be. To install the Arduino IDE go here. Scroll down to the “All Ubuntu versions (old and new) can get the newest packages from Debian Sid”. This is the section for Xubuntu 10.04 LTS. You cannot install the Arduino IDE through the Ubuntu Software Centre, though some prerequisites are there. There are two packages to install, but the second package, only called “Arduino” has prerequisites that need to be installed before. The Arduino Core installed without issue. The Arduino only package has prerequisites, so install these first. The java6-runtime is available through the Software Centre. The librxtx-java is also available through the Software Centre, but is backlevel at v1.01. You must override this and install the one at Debian, even though it says the one at the Software Centre is more stable. Install libjna-java. After these prerequisites are installed, then install Arduino. This completes the Arduino IDE installation.

The Arduino IDE will be located at /usr/share/arduino. An icon will be added to your Xubuntu menu, under “Development”. Put an LED into port 13 (long leg of the LED) and ground (beside port 13, the short leg and flat side of the LED). Plug a USB cable into your PC and into your Arduino. From your Xubuntu screen, go “Applications”, “Development”, “Arduino”, which start up the Arduino IDE. Within the Arduino program go “Tools”, “Serial Port”, and select “/dev/ttyACM0”, which is the USB port. Then go “File” “Open” “Examples” “1. Basics” “Blink/” “Blink.ino”. Click the “check mark in a circle” on the top left side of the screen to verify. Then click the “right arrow in a circle”, right beside the “check mark in a circle”, which will send the program to the Arduino unit. The Arduino should start blinking. You are done verifying the Arduino IDE and its connection to the Arduino. If the Arduino IDE is good enough for you, you can stop here and play with your Arduino.

The next step, if you wish, is to install Eclipse and the Arduino plugin. The instructions are here and are very well written. I will add some comments for my Xubuntu 10.04 LTS experience. Specifically here are the instructions for installing Eclipse. Download the “Eclipse IDE for C/C++ Developers (includes Incubating components)” here, Linux 32 bit version (My computer is 32 bit). The download is pretty easy. Once downloaded, find it in your system. I found mine under /tmp. Double ckick it and it will install under your Xubuntu login name. It will create a folder called “Eclipse”. Using Terminal, move this folder to the /opt directory. For me a Xubuntu novice, this move to the /opt directory was the most difficult. Find the Eclipse icon in the /opt/eclipse directory, right click and make a desktop icon.

You now have Eclipse installed. Follow the Arduino Eclipse instructions. Where the instructions say “give a name to the workspace”, within Eclipse go “Window” “Preferences” “General” “Workspace” to get to the screen in the picture.

To Install the Arduino plugin follow the instructions and use: “http://www.baeyens.it/eclipse/update site”. Yes, there is a space between “update” and “site”. Ensure the URL is correct. I added the http:// in front and inadvertently duplicated this. Select the most current version under Arduino, which for me was 1.2.

In configuring the Arduino, go “Windows” “preferences” “Arduino” “Arduino”. My system put the Arduino IDE into “/usr/share/arduino”.

Once configured, Eclipse would not recognize the ttyACM0 USB port, the same one we used in the Arduino IDE. On the left side of Eclipse, right click on My_Sketch, then “Properties” at the very bottom. In port type “dev/ttyACM0” over top “dev/ttyS0”. Copy an Arduino program, compile it and send it to the Arduino. This will give you an error like “port ttyACM0 not found”, but will successfully upload and run on your Arduino unit. To remove this error message follow these instructions at the very bottom, which says to edit your eclipse.ini file and add the following line: “-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0” at the right spot. The error message will disappear and you can now easily develop in Eclipse with your little Arduino. When you unplug the Arduino, Eclipse will put in the ttyS0 port. Reattach the Arduino and the ttyACM0 port will return.

That is it for my experience. The most frustrating issues for this install were how to untar the Eclipse program into a folder /opt/Eclipse, but these are Xubuntu issues and not Eclipse nor Arduino issues.

Good Luck

Leave a Reply

Your email address will not be published. Required fields are marked *