Linux With Arduino

In this article we learn how to use Arduino IDE in Linux

Install the Arduino Software (IDE) on Linux

Quick Start

The Linux build of the Arduino Software (IDE) is now a package that doesn’t require any specific procedure for the various distributions availabe of Linux. The only relevant information is the 32 or 64 bit version of the OS.

Download the Arduino Software (IDE)

Get the latest version from the download page. You can choose between the 32, 64 and ARM versions. It is very important that you choose the right version for your Linux distro. Clicking on the chosen version brings you to the donation page and then you can either open or save the file. Please save it on your computer.

Arduino IDE Download Page

The letest version for Linux 64bit is arduino-nightly.

Extract the package

The file is compressed and you have to extract it in a suitable folder, remembering that it will be executed from there.

Extract the package To foldder

For example i am extracting it on Desktop.

Run the install script

Open the arduino-nightly folder just created by the extraction process and spot the file. Right click on it and choose Run in Terminal from the contextual menu. The installation process will quickly end and you should find a new icon on your desktop.

If you don’t find the option to run the script from the contextual menu, you have to open a Terminal window and move into the arduino-nightly folder. Type the command ./ and wait for the process to finish. You should find a new icon on your desktop.

Run the install script

Configure your Board

It might happen that when you upload a sketch – after you have selected your board and the serial port -, you get an error Error opening serial port … If you get this error, you need to set serial port permission.

Open Terminal and type:

ls -l /dev/ttyACM*

you will get something like:

crw-rw---- 1 root dialout 166, 0 Sep  5 20:52 /dev/ttyACM0

you will get something like:

The “0” at the end of ACM might be a different number, or multiple entries might be returned. The data we need is “dialout” (is the group owner of the file).

Now we just need to add our user to the group:

sudo usermod -a -G dialout <username>

where <username> is your Linux user name. You will need to log out and log in again for this change to take effect.

Configure your Board

After this procedure, you should be able to proceed normally and upload the sketch to your board or use the Serial Monitor.

Let’s start with first example

  1. Open Arduino IDE through the shortcut icon
Arduino IDE shortcut icon

2. Clic on File > Example > 01 Basics > Blink

first Blink Example
Example Window
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second

3. Click on Verify to compile the Example Code.

4. click on Upload to the Board

If you find below error
avrdude: ser_open(): can’t open device “/dev/ttyACM0”: Permission denied
Problem uploading to board. See

Use below command to resolved it

 $sudo chmod -R 777 /dev/ttyACM0

Thanks for Reading …..

Leave a Reply

Your email address will not be published.