• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Arduino on the plug  (Read 2125 times)
jmknapp
Newbie
*

Karma: 0
Posts: 45



View Profile
« on: May 04, 2009, 04:50:57 AM »

Communicating with an Arduino microcontroller board http://www.arduino.cc/ over the plug's usb port minimally requires a kernel with support for the Arduino's FTDI serial usb chip. I use the 2.6.30 rc3 kernel with the following modules:

usbserial
ftdi-sio

Given those prerequisites, attaching the Arduino to the usb port results in /dev/ttyUSB0 becoming available for serial i/o.

This arrangement would suffice for communicating with an Arduino that's running an existing application developed and downloaded using another box (Windows, Linux, whatever). To develop and download applications to the Arduino directly from the plug, one could install the following to enable command-line development:

Downland the "Arduino from the Command Line" software:

http://www.arduino.cc/en/Hacking/CommandLine

Also required are:

avr-libc
gcc-avr
binutils-avr
avrdude (command-line tool)

The first three can be installed with apt-get but unfortunately the stock avrdude doesn't work and an Arduino-compatible version has to be built from source:

wget http://www.arduino.cc/files/avrdude-5.4-arduino-src.tgz

Unzip and tar to a directory.

apt-get:

flex
bison

Then make avrdude as usual (make clean, configure, make). This results in an avrdude executable and an avrdude.conf. Put avrdude in /usr/bin or wherever and avrdude.conf in /etc.

For those who prefer developing Arduino apps using the usual java IDE rather than using these clunky commands-line tools, rest assured, it can be done, albeit after loading a lot of software (X11, gnome, java, etc.) that requires a large-capacity SD card as the root filesystem (the 512MB flash won't be enough). Given that, install X11, gnome and vnc per this thread: http://openplug.org/plugforum/index.php?topic=114.msg719#msg719.

Then install the JDK:

openjdk-6-jdk
librxtx-java

Then get the latest Arduino IDE software:

http://arduino.googlecode.com/files/arduino-0015-linux.tgz

Unzipping and untarring that gives a top-level script to run to launch the Arduino IDE:

./arduino

However, there are some 32-bit ELF files included in the package which aren't compatible with ARM. As a quick fix, from the directory that has the arduino script:

cp /usr/bin/avrdude hardware/tools
cp /etc/avrdude.conf hardware/tools

Edit the arduino script, change this line:

LD_LIBRARY_PATH=`pwd`/lib:${LD_LIBRARY_PATH}

to:

LD_LIBRARY_PATH=/usr/lib:${LD_LIBRARY_PATH}


After that, the IDE should work (connecting to the plug via vnc)! Hopefully I remembered everything I did to get this to work. If not, if you run into a snag, ask a question here to jog my memory.

Joe
Logged

Pages: [1]
Print
Jump to: