First steps: setting up the Arduino and the IDE on Kubuntu

While it’s still a long way towards the first steps of my little robot, I just made my first steps in this project. I will post an outline for the project in one of the following posts. Here I just state that my robot will be controlled by an Arduino Uno. This post is about connecting and programming the Arduino from my Kubuntu Linux PC.

A few days ago, I received my Arduino Uno clone “Simpleduino” from Amazon.de for 12.99 Euro (http://www.amazon.de/gp/product/B00OEIMCIW). From http://www.arduino.cc/en/pmwiki.php?n=Main/Software, I downloaded the Arduino IDE, arduino-1.6.4-linux32.tar.xz, for my 32bit installation of Kunbuntu 14.04.2 LTS.

After connecting the Arduino Uno to my computer, I opened the .tar archive from the file manager (“open with Ark”), and inside the directory “arduino-1.6.4” I started “./arduino”. This started the IDE. Under “Tools -> Board”, I selected “Arduino Uno”, and under “Tools -> Port” I selected the only option “/dev/ttyACM0”. Now I thought I was ready to go, and I wanted to try a first example which turns the on-board LED (which is connected to Pin 13 of the Uno board) on and off. This example is found in the IDE under “File -> Examples -> 01.Basics -> Blink”. After selecting this example, I pressed the upload button (the right arrow), but instead of getting a blinking yellow LED, I got the error message:

avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied
ioctl("TIOCMGET"): Inappropriate ioctl for device

A quick Google search pointed me to the solution at http://arduino-er.blogspot.de/2014/08/arduino-ide-error-avrdude-seropen-cant.html. I had to add myself to the “dialout” group, and change the permissions for “/dev/ttyACM0”:

sudo usermod -a -G dialout <user>
sudo chmod a+rw /dev/ttyACM0

This fixed the problem. After a few seconds, the program was uploaded and the LED was blinking. My first Arduino program is running!