Installing Arduino 0006 on Ubuntu 6.10
The installation of Arduino on Ubuntu 6.10 is much easier than it was on version 5.10. There are some really good tutorials for installing Arduino on Linux (Debian, Gentoo, Linux, forum thread) but I still like to describe my installation process Arduino 0006:
- download and unzip sources from http://www.arduino.cc/files/arduino-0006-linux.zip
- add multiverse to repository and install java sdk:
sudo apt-get install sun-java5-jdk
- export CLASSPATH:
export CLASSPATH=/usr/lib/jvm/java-1.5.0-sun/bin:/usr/lib/jvm/java-1.5.0-sun/jre/lib/rt.jar
- install additional packages:
sudo apt-get install gcc-avr avr-libc binutils-avr jikes uisp
- export DIRAVR:
export DIRAVR=/usr
- install RXTX:
sudo apt-get install librxtx-java
- compile Arduino sources:
cd arduino-0006/build/linux
and compile it with./make.sh
- you need a kernel supporting the ftdi serial/usb chip:
sudo apt-get install libftdi0
- run it:
./run.sh
(if you get an error like “jikes cannot properly run on this system” you have to modify the arduino script in directory work -> see reference *1 at end of document)
- run your first program: open Hello World program at menu File – Sketchbook – Examples – led_blink, compile it (press play button and wait till “Done compiling” message appears), press reset button on the Arduino board and upload it to the board pressing “Upload to I/O Board” (RX and TX leds should be flickering while uploading the program). There should appear the message “Done uploading” and after a few seconds the LED should start to blink. See http://www.arduino.cc/en/Main/Howto for getting familiar with the board.
That’s it, Arduino should be up and running. In my case after plugging the cable Arduino detected automatically the usb port /dev/ttyUSB0
To make the execution of Arduino easier you can create a small bash script creating a /usr/local/bin/arduino
file:
cd /usr/local/lib/arduino-0006/build/linux export DIRAVR="/usr" export JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun" export CLASSPATH="$JAVA_HOME/bin:$JAVA_HOME/jre/lib/rt.jar" ./run.sh
If you are a Java developer it may be better to set the environment variables in the /etc/environment
file:
JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun" DIRAVR="/usr" export JAVA_HOME DIRAVR CLASSPATH="$JAVA_HOME/bin:$JAVA_HOME/jre/lib/rt.jar" export CLASSPATH
*1: jikes error: I had to change the script for starting arduino (arduino-0006/build/linux/work/arduino) to:
#!/bin/sh CLASSPATH=java/lib/rt.jar:lib:lib/build:lib/pde.jar:lib/core.jar:lib/antlr.jar:lib/oro.jar:lib/registry.jar:lib/mrj.jar:lib/RXTXcomm.jar export CLASSPATH
# put the directory where this file lives in the front of the path, because # that directory also contains jikes, which we will need at runtime. PATH=`pwd`/`dirname $0`:`pwd`/java/bin:${PATH} export PATH
# put the directory with the native RXTX libs in the library path LD_LIBRARY_PATH=`pwd`/lib:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH
java processing.app.Base
Tags: arduino