RRC|BIOSTATISTICS

Getting Started With Your Arduino on Crunchbang

This post is also known as:
What to do when you get the error message –
avrdude: stk500_recv(): programmer is not responding

The initial start up with Arduino can be tricky. The error message from the “avrdude”, or utility that allows for download/manipulation of software for AVR microcontrollers (ie: that neat looking arduino board you have in your hand) is telling you it has no idea where the heck your arduino is. So help the poor thing out, why don’t you?

Step One – Install the Arduino Software

Install the arduino software with all its dependencies from the package manager. This means you can use “apt-get” in ubuntu or any Debian-based distro like CrunchBang, which is how I did this particular set up. Enter the command: sudo apt-get install arduino arduino-core Note that these are two separate software packages, arduino and arduino-core. There are still some dependencies required for set up.

Step Two – Install Dependencies

Next, we’ll get the latest, compatible version of librxrt-java. This allows communication for Java Development. I downloaded the 32-bit version, so check the files you’ll need here at this link.

To download the file enter the commands: wget http://ftp.debian.org/debian/pool/main/r/rxtx/librxtx-java_2.2pre2-11_i386.deb
sudo dpkg -i librxtx-java_2.2pre2-11_i386.deb The “wget” command lets you download files from the web without running them. The “sudo dpkg” command lets you actually download debian files.

Step Three – Get Write Permissions

Now add yourself to the ‘dialout’ group in order to have write-permissions on the serial port. Make sure to use forward ticks for the “whoami” statement. You can test out what “whoami” does in the terminal – it echos your username! sudo adduser whoami dialout Now restart your computer so you can acess the USB port.

Step Four – Almost There!

Now you can download the Arduino IDE. The recommendation is to use the 1.0 release. There is a new 1.5 release but its still in beta. You can download it from the Arduino.cc website. Download the version 1.0 tarball: arduino-1.0-linux.tgz Extract that software, enter the folder, and run the software by doing the following:

Extract the software from the tarball folder with tar -xvzf arduino-1.0-linux.tgz Then enter that folder with cd arduino-1.0/ and compile the software with ./arduino

Step Five – ID Your Arduino

Now you can plug in your Arduino board via USB to your computer. Wait a few seconds for the device to be recognized. From the terminal, again launch the Arduino software with the command ./arduino

Go to the Tools —> Board —> Select your board
Last, go to the same menu and go to Tools —> Serial Port —> Select your device It may take a few tries. If you’re wrong, you’ll see the programmer not responding error message. Your arduino will most likely be under serial port S0.

Step Six – Testing the Arduino

To test if you’ve set it up correctly, go to the menu bar again and choose a simple program like “Blink”: File —> Examples —> 0.1 Basics —> Blink Click the “Verify” checkmark icon….

Aaaand the LED should blink away. Congrats!

An Aside.
Remember folks, an arduino requires 12V and the beagle bone requires 5V. Many a sad day for you if you get that mixed up.

Comments