Installing Arduino IDE

Pages
Contributors: bboyho, b_e_n

Linux

If you are a Linux user, you probably know that there are many different distribution 'flavors' of Linux out there. Unsurprisingly, installing Arduino is slightly different for many of these distributions. Luckily, the Arduino community has done an excellent job of providing instructions for most of the popular versions. Click on the link below that covers your flavor of Linux:

If the above directions did not work for you, or you don't see your distribution, try this catch-all guide.

You can go to the download page and download the latest version of Arduino for Linux (there are 32-bit and 64-bit versions available) when your system is properly set up.

Note: Raspberry Pi users with Raspbian installed should use the Linux ARM download. Do not use the command line installation process. For more information, please refer to this blog post from Arduino.

Connecting Your Arduino

Power up your Arduino by connecting your Arduino board to your computer with a USB cable (or FTDI cable if you're using an Arduino Pro). You should see the an LED labeled 'ON' light up. (this diagram shows the placement of the power LED on the UNO).

ZIP

Note: You'll need to know if your Linux distribution is running on 32-bit or 64-bit when downloading the Arduino IDE. Type the following command in the serial terminal to determine what version your OS is running on.

uname -a
If you receive an output with x86_64, this indicates that it is a 64-bit OS.

Once you download the zip file version of Arduino, you'll need to extract the files yourself. Don't forget which folder you extract the files into! Once downloaded, open a serial terminal and navigate to the Arduino program folder that was unzipped using the cd command and the folder path. In this case, we downloaded Arduino IDE v1.8.5, 64-bit version for the Ubuntu distribution. The path and folders may be different depending on the version that is downloaded. You may need to use the ls command to navigate.

language:bash
cd /Downloads/arduino-1.8.5-linux64/arduino-1.8.5

Once you are in the Arduino program folder, you'll need to enter the following command in the terminal window to install.

language:bash
./install.sh

At this point, your terminal window will probably look like the following.

alt text

When finished, the Arduino IDE will be installed on the desktop!

Drivers for RedBoard on Linux

For the Arduino Uno, you do not need to install drivers for Linux! You may need to change the COM port permissions which will be explained further below. You can skip on down and try uploading a blink sketch!

Drivers for RedBoard on Linux

Depending on your board, there may be different USB-to-serial converters on your board. If you are using a RedBoard you will need to go to the How to Install FTDI Drivers tutorial. If you are using the or RedBoard Qwiic, you will need to go to the How to Install CH340 Drivers tutorial. Make sure to look closely at your board and its respective hookup guide to determine USB-to-serial converter that is on board.

How to Install FTDI Drivers

June 4, 2013
How to install drivers for the FTDI Basic on Windows, Mac OS X, and Linux.

How to Install CH340 Drivers

August 6, 2019
How to install CH340 drivers (if you need them) on Windows, Mac OS X, and Linux.

Launch and Blink!

After following the appropriate steps for your software install, we are now ready to test your first program with your Arduino board!

Launch the Arduino application. If you disconnected your board, plug it back in.

Open the Blink example sketch by going to: File > Examples > 01.Basics > Blink.

alt text

Select the type of Arduino board you're using: Tools > Board > Arduino Uno.

alt text

Note: As you move to other architectures, you may need to select a different board definition depending on your development board. For the Arduino Uno R3 and RedBoard development boards with ATmega328P, you can simply select Arduino Uno. Certain Arduino IDE versions may have you select Arduino/ Genuino Uno.

Select the serial port that your Arduino is attached to: Tools > Port > xxxxxx (it'll probably look something like "/dev/ttyACM0" but probably with a different number)

alt text

Note: If you're not sure which serial device is your Arduino, take a look at the available ports, then unplug your Arduino and look again. The one that disappeared is your Arduino.

With your Arduino board connected and the Blink sketch open, press the "Upload" button.

alt text

After a second, you should see some LEDs flashing on your Arduino, followed by the message "Done Uploading" in the status bar of the Blink sketch.

alt text

Troubleshooting Tip: Having trouble uploading? If you receive the following error when uploading, this could be due to a few reasons. Most likely there is something with the user permissions if you have not used the Arduino Uno on your computer before.

avrdude: ser_open(): can't open device "/dev/ttyACM0" Permission denied Problem uploading to board.
You'll see the output at the bottom of the Arduino IDE.

Arduino Upload Error Linux

Try adjusting the permissions by opening a terminal window.

ls -l /dev/ttyACM*
You'll get something similar to the following output.

crw-rw---- 1 root dialout 188, 0 Jul 30 14:14 /dev/ttyACM0
Then type the following command where the <username> is your Linux account user. Make sure to enter your password to change the settings.

sudo usermod -a -G dialout <username>
You'll probably see something similar to the output below with a different username. In this case, our username was "pdev."

Linux Terminal Window

You'll need to restart your Linux for the changes to take effect. Since we are already in the terminal window, type the following command to restart your computer. Of course, you can use the GUI as well to restart if you prefer.

sudo reboot

If everything worked, the onboard LED on your Arduino should now be blinking! You just programmed your first Arduino!

Note: Depending on the architecture and development board, the built-in LED may be defined on a different pin. You may need to adjust LED_BUILTIN or pin 13 to a different value before uploading.

Troubleshooting

The Arduino Playground Linux section is a great resource for figuring out any problems with your Arduino installation.


Morty Proxy This is a proxified and sanitized view of the page, visit original site.