2009
11.02

In this tutorial I will show you how to setup the Arduino IDE on Ubuntu 9.10 32-bit. I’ll also show you how to add an Application Launcher to quickstart the Arduino IDE

Screenshot sketch nov02a Arduino 0017 Tutorial : Getting started with Arduino on Ubuntu 9.10

I’ll assume you haven’t already installed any of the necessary packages to run the Arduino IDE.

1. First open a terminal ( Applications > Accesories > Terminal ), paste the following code and hit enter :

sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk 
sun-java6-fonts sun-java6-plugin gcc-avr avr-libc

 
2. Next we need to uninstall Ubuntu’s braille support as it is known to cause conflicts with the Arduino IDE.

To do so go back to the terminal and enter :

sudo apt-get remove brltty

 
3. Now we need to setup Java
GNU’s Java doesn’t support the Arduino so to fix this run the command

sudo update-alternatives --config java

 
This will show you a list of java alternatives installed on the machine.
Select the entry ‘java-6-sun’

4. Now we are ready to download and install the arduino environment

Click here to download version 17 of the Arduino IDE. Alternatively go here to download a specific version.

5. Copy the downloaded file to your home directory ( saved by default in /home/username/downloads )

Extract the downloaded file into your home directory ( right-click > extract here ).

6. To start the Arduino IDE open the arduino-0017 folder and double click the arduino file, when prompted choose Run.

If you want to start the Arduino IDE from the command line, cd into the folder

cd /home/username/arduino-0017

 
and start the IDE with the command

./arduino

 

I however prefer to have a launcher to quickstart applications.

1. Download this icon to your desktop ( right-click > Save image as… )

arduino Tutorial : Getting started with Arduino on Ubuntu 9.10

2. Open a terminal, go to your desktop and copy the image to /usr/share/icons

cd Desktop/
sudo cp arduino.png /usr/share/icons/

 
3. Next right click the top panel and select Add to panel…

Screenshot Add to Panel Tutorial : Getting started with Arduino on Ubuntu 9.10

5. Select the first entry ‘Custom Application Launcher’ and hit Add

6.In the Create Launcher window enter

A name for the launcher :

Arduino

 
The command to be executed when the launcher is clicked :

bash -c "cd /home/yourusername/arduino-0017/; ./arduino"

 
And any comment you want to add :

starts the Arduino IDE

 
Now click on the spring icon and go to the /usr/share/icons/ folder and select the arduino.png image.

Your Launcher should look like this

Screenshot Launcher Properties 1 Tutorial : Getting started with Arduino on Ubuntu 9.10

That was it! You’re all setup to hack and thinker with your Arduino on Ubuntu 9.10.

Now run along a go blink some LEDs.

Back to homepage

27 comments so far

Add Your Comment
  1. Nice straight forward Howto…

  2. Thanks, I’m glad to hear you appreciate the tutorial.

  3. Great step by step, have linked to it from our blog.

    http://www.robotgames.com/20091122/arduino-with-ubuntu-9-10/

  4. Thanks! Great site btw, I love robotics!

  5. Nice to see the Ubuntuguide for Karmic Koala links to this tutorial

  6. This was really helpful! Thanks…

  7. Just what I needed. Thanks a lot. Worked perfectly well for me.

  8. i did EXACTLY what the tutorial says and when i always verify/upload it gives me:

    /home/yror10/arduino-0017/hardware/cores/arduino/wiring_private.h:28:20: error: avr/io.h: No such file or directory

    /home/yror10/arduino-0017/hardware/cores/arduino/wiring_private.h:29:27: error: avr/interrupt.h: No such file or directory

    /home/yror10/arduino-0017/hardware/cores/arduino/wiring_private.h:30:23: error: avr/delay.h: No such file or directory

    /home/yror10/arduino-0017/hardware/cores/arduino/wiring_private.h:31:19: error: stdio.h: No such file or directory

    from /home/yror10/arduino-0017/hardware/cores/arduino/wiring_shift.c:25:

    /home/yror10/arduino-0017/hardware/cores/arduino/wiring.h:101: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘boolean’

    /home/yror10/arduino-0017/hardware/cores/arduino/wiring.h:102: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘byte’

    /home/yror10/arduino-0017/hardware/cores/arduino/wiring.h:110: error: expected ‘)’ before ‘mode’

    /home/yror10/arduino-0017/hardware/cores/arduino/wiring.h:111: error: expected ‘)’ before ‘int’

    /home/yror10/arduino-0017/hardware/cores/arduino/wiring.h:123: error: expected ‘)’ before ‘pin’

    /home/yror10/arduino-0017/hardware/cores/arduino/wiring.h:125: error: expected ‘)’ before ‘dataPin’

    /home/yror10/arduino-0017/hardware/cores/arduino/wiring.h:127: error: expected ‘)’ before ‘void’

    /home/yror10/arduino-0017/hardware/cores/arduino/wiring_shift.c:27: error: expected ‘)’ before ‘dataPin’

    do you know how to fix this because it would be a great help.

  9. You have to install the packages ‘avr-libc’ and ‘gcc-avr’

    Open a terminal and type :

    sudo apt-get install avr-libc gcc-avr

  10. So I guess I am officially a computer addict now, since this is my first post on the internet with a computer question. I just got Ubuntu 9.10, and I LOVE it, it works superfast on my laptop. I have an arduino and it works fine with Windows. I followed the tutorial and everything works up until I launch it; it asks me to choose a folder for the Sketches, and I do, and then nothing happens! Does anyone know why? Any help is GREATLY appreciated! I really need to make some LEDs blink.

  11. First, welcome to the internet!

    I found someone explaining the exact same issue here.

    The problem seems to be using the arduino (comes with 32-bit versions of precompiled binaries) on a 64-bit version of Ubuntu.

    Could you verify if you are running a 64-bit version of Ubuntu 9.10 on your laptop?

  12. Thanks for your response and finding the help for me! It just seemed to fix itself after I restarted. Linux seems to take a little more effort at configuration, but I am really liking it better than Windows! Especially thanks to people like you who make such lovely tutorials as this. Thank you so much!!! :)))

  13. Thank you

  14. this tutorial was great, thank you so much!

  15. I will feel stupid soon I am sure, but when I try to select Sun Java (sudo update-alternatives –config java), I am told there is nothing to configure:
    “There is only one alternative in link group java: /usr/lib/jvm/java-6-sun/jre/bin/java
    Nothing to configure.”
    This could just mean that I have nothing but Sun Java on here, but I am guessing this is an issue because the IDE fails to upload to the board (it sees it, and also I know the board is fine so it can’t be hardware failure).
    What do you think is up? Hmm.

  16. By the way (well really this is the most important part), this is what the IDE tells me:
    avrdude: stk500_recv(): programmer is not responding
    It’s a Duemilanove 328.

  17. I’m pretty sure the ‘Nothing to configure’ means exactly that, you only have one choice so you can’t configure it to be anything else but the one installed.

    I found a thread about the same error message, a solution is provided in one of the last posts.

    Let me know if this was any help.

  18. Thanks, Its people like you that make me want to destroy m$ and use Ubuntu full time. Now if only it supported my lightscribe smart pen…

    Thanks again.

  19. Euhm thank you I guess.

    I’m not contra MS however, they both have pro’s and con’s, but that’s not worth a discussion.

  20. Thanks, very nice tutorial :-) I have one problem though, Arduino won’t start unless started as root. There are no error messages, it just doesn’t start. If I start it as root everything works, I can program the Arduino (FreeDuino serial connected to /dev/ttyS0) just fine.

  21. Thank you this not only saved me from a major headache but solved my problem with the avrdude stk_500 error

  22. Thanks a lot, simple way of launching IDE at last. The only problem was I had to chmod the icon to be accessible so if you can’t find it when selecting icon, type in bash: sudo chmod 777 /usr/share/icons/arduino.png

  23. you ROCK!! ( i was in dependency hell before that part of your tutorial to use an alternative java package)

  24. I just noticed there is now a PPA (I’m well behind on the times)

    https://launchpad.net/~arduino-ubuntu-team

    As linked from arduino.cc
    It might be worth updating the blog post, and an additional thanks for writing this in the first place, It helped me loads.

  25. thank you very much indeed

  26. thank you very much…its really helpful….i am using ubuntu 11.04,,,,,how to creat a customized launcher???…thanx

  27. It might be necessary to add your user to the “dialout” group for permissions.

Please leave these two fields as-is:
Prove you are human by reading this resistor:
0Ω+/- 5%

0
0
1
2
3
4
5
6
7
8
9

0
0
1
2
3
4
5
6
7
8
9

0
0
1
2
3
4
5
6
7
8
9

5
5
10
20

Match the sliders on the left to each color band on the resistor.

Click Here for a new resistor image.

If you'd like to learn more, read about resistor color codes here.