Website Logo. Upload to /source/logo.png ; disable in /source/_includes/logo.html


News and Updates about OpenSensors.IO

Getting Started With Arduino on Linux (Ubuntu)

Ordered and received your Arduino Uno (I actually received it a while ago!) now what? The first step is to rush to the ‘Getting Started’ page on Arduino’s website.

To install Arduino on Linux (I’m running Ubuntu 14.04) visit the wiki page with instructions for most Linux distributions. I used the instructions for Ubuntu 12.04 or newer and ran

~$ sudo apt-get update && sudo apt-get install arduino arduino-core
Afterwards you should be able to plug your Arduino and use Arduino IDE to code/upload code to it. It didn’t work directly for me. I couldn’t launch Arduino IDE by clicking the logo so I tried the CLI
~$ arduino
Here’s the error it returned:

Exception in thread “main” java.lang.ExceptionInInitializerError.

I found a solution on AskUbuntu forum. I downgraded from java 7 to java 6 (***) using the command:

~$ sudo update-alternatives —config java
I then managed to launch Arduino from the CLI (I was asked to authenticate) and tried to upload a code example to my Arduino (Files > Examples > 01.Basics > Blink). I received this error message: Serial port ‘COM1’ not found. Did you select the right one from the Tools > Serial Port menu?

In Tools I saw that Serial Port was greyed out so I couldn’t even select the port. from Stackoverflow I found that to give read and write privilege on the usb port I could run Arduino with the administrator privileges. And so I used

~$ sudo arduino
–> It worked! It blinked! Here’s a proof:


  • Check your Arduino IDE settings: Tools > Board (the right borad is select), Tool > Serial Port (the right port for your device is ticked).
  • Check all dependencies were downloaded with arduino and arduino-core .
    • Arduino’s dependencies: arduino-core, default-jre, libjna-java, librtx-java
    • Arduino-core’s dependencies: avr-libc, avrdude, gcc, gcc-avr
  • Also try LadyAda’s help page.

(***) Well, well. You might realise later that you actually need java 7 for another program to work! But fear not, see the alternatives below.

Alternatives to Arduino IDE

Arduino IDE is based on java but luckily there other tools to write code for Arduino.

I tried Ino which is written in Python and is a command line tool and allows to write code in any text editor. It is straightforward to install with instructions given. You will need to install picocom program if you don’t have it

~$ sudo apt-get install picocom
There are other alternatives to the Arduino IDE like Codebender which is an online development platform.