How to Program Arduino Boards

Filed in: Documentation.Arduino · Modified on : Fri, 26 Dec 08

maintained by gnufs

Arduino is a simple development board with its circuitry and IDE freely licensed. (You can also use compatible Freeduino that has no trademark restrictions as Arduino has.)

NOTE: This tutorial is tested on Arduino's Diecimila model.

Installation

Interacting with the Micro-controller

Arduino platform centers around the Atmel AVR microcontroller. To be able to program it, we will need avr support:

sudo apt-get install gcc-avr avr-libc

Installing the Arduino IDE

Arduino's IDE provides a simple platform to code Arduino in a Python-like language, compile the code and upload it to the board.

The IDE is based on Java and requires Java Run-time Environment. The IcedTea provides a free software alternative for this requirement:

sudo apt-get install icedtea-java-jre

Your system should now be properly set for the Arduino's IDE software. Download the compiled package from http://www.arduino.cc/files/arduino-0012-linux.tgz (or the latest release at http://www.arduino.cc/files/) to the directory you want to setup the IDE and extract the package.

Programming the Arduino

You can run the IDE either by double-clicking on the arduino script and selecting to Run or by cd'ing to its directory in terminal and entering ./arduino

To upload to your USB-connected board, you will need to select Tools > Serial Port > /dev/ttyUSB0

You can find further information on how to program Arduino on the project's Learning page.

Troubleshooting

No /dev/ttyUSB0

If the Arduino IDE does not detect the USB connected board, it may be caused by a conflict with the braille support that comes with gNewSense by default. Try detecting the board after uninstalling the brltty:

sudo apt-get remove brltty


Page last modified on December 26, 2008, at 11:22 PM

gNewSense is a project developed by volunteers all over the world and it's supported by the Free Software Foundation.

The content in this Web site can be used as follows:

All documentation is available under the terms of the GFDL with no invariant sections. ( note on the license )

Artwork is Free Cultural Work and is available under the terms of the cc-by-sa license.