How to Install and Run Arduino in Linux
This tutorial explains how to install and run Arduino in Linux distribution such as an Ubuntu. Arduino is already available in the software center of Ubuntu which is one of the repositories of Linux.
Ubuntu needs to meet the required dependencies of Arduino. so before installing Arduino make sure that the dependencies are met.
Required dependencies of Arduino in Linux
Two dependencies are required before install Arduino in Linux:
- Java run time environment
- GCC AVR Compiler
Java run time environment
Arduino software is made in java environment and to run the java program, we need to download and install Java run time environment. There is no need of installing java run time if it is already installed in your system.. Since Arduino software already includes java you can install it individually from Ubuntu software center using the following command line from command terminal:
sudo apt-get install openjdk-7-jre
GCC AVR Compiler
Complier is an extended tool which converts source file to object file (machine code) so that CPU can understand it. As Arduino belongs to AVR family, we need the AVR compiler for compiling the Arduino source code. But you don’t need to install it as the software already includes GCC AVR Compiler in it.
We can install Arduino from Ubuntu software centre if not already installed in the system.
Enter the following command from terminal and press enter key:
Arduino
If arduino is installed, it will open but if not installed the following output will be displayed on your screen:
Fig. 1: Screenshot of Output on Linux Console if Arduino is not Installed on Ubuntu
Enter the following command from terminal and press enter key:
sudo apt-get install arduino
Now Arduino is starting to get installed from ubuntu software center. Wait for the installation process to be over. Now open the Arduino from command terminal by entering the following command:
arduino
Now, arduino is opened and displays the dialout box on screen.
Note: Here you must be added to the ‘dialout’ group to be able to upload sketches to the Arduino.
After adding in dialout box , logout from system and restart the system. It will look like the following:
Fig. 2: Screenshot of Arduino IDE on Ubuntu
Now plug the arduino board through USB cable and check if it is connected or notby entering the following command:
lsusb
In my system, it is connected and displays the following:
Bus 002 Device 004: ID 2341:0001 Arduino SA Uno (CDC ACM)
Now, open Arduino and go to tab Tool > Serial port > and select the arduino port.
Select the specific board from tool > board. Select simple Blink example and compile it.
Now, you can work with arduino in Ubuntu Linux.
Fig. 3: Screenshot of Arduino IDE on Ubuntu
You may also like:
Filed Under: Featured Contributions, Tutorials
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.