Getting  [email protected] installed and ready-to-go should only take a few minutes.

The Optiboot bootloader is already installed on  [email protected] ’s processor, but we need to make sure the Raspberry Pi is setup correctly, and has the necessary software in place.

The easiest way to do this is from the command line, and the best way to do that, is to ssh into the Raspberry Pi so that you can copy and paste the commands below into your terminal (you can use PuTTY if you are not on a Unix based system like Linux or OS X).

By default, Raspberry Pi copies its shell and kernel messages to the serial port. As  [email protected] uses this channel to communicate with the host, we need to disable that. This is most easily done with the in-built utility raspi-config.

Setup Pi Hardware

~ $ sudo raspi-config

From the menu, select Advanced Options

image alt text

Then select Serial

image alt text

and disable shell and kernel messages on serial

image alt text

Back at the Advanced Options menu you’ll also want to enable I2C, so that you can access the  [email protected] peripherals directly if required

image alt text

Enable both the ARM I2C interface

image alt text

…and the loading of kernel modules

image alt text

Now we need to load a few software pre-requisites…

First make sure you have up-to-date packages installed

Update Packages

~ $ sudo apt-get update

~ $ sudo apt-get upgrade

Then install some essential packages, including a modified version of avrdude.

Install a few essentials

~ $ sudo aptitude install git arduino i2c-tools

~ $ git clone git://

In order for the Arduino IDE to work properly with  [email protected] , it needs to perform a reset during code upload. It does this using the modified avrdude we just cloned, so enter the following commands:

Modify avrdude

~ $ cd avrdude-rpi/

~ $ sudo cp autoreset /usr/bin

~ $ sudo cp avrdude-autoreset /usr/bin

~ $ sudo mv /usr/bin/avrdude /usr/bin/avrdude-original

~ $ sudo ln -s /usr/bin/avrdude-autoreset /usr/bin/avrdude

Finally, so that the Arduino IDE can ‘see’ the  [email protected] serial port, we need to create a symlink between the Raspberry Pi ttyAMA0 port and ttyS0.

Create a link to ttyS0

~ $ sudo -i

~ # echo 'KERNEL=="ttyAMA0", SYMLINK+="ttyS0",GROUP="dialout",MODE:=0666' > /etc/udev/rules.d/80-ardhat.rules

~ # udevadm trigger

Start the Arduino IDE…

image alt text

…and you’re all set!!