30

I have an Arduino UNO, which I need to get working with Ubuntu.

Can somebody explain to me the steps required to install the IDE on Ubuntu?

0

8 Answers 8

16

Arduino IDE from Ubuntu's repos are usually outdated. There are several ways to install the latest Arduino IDE: with umake, from arduino.cc tar.gz, as a snap or flatpak. In all cases you may need to add your user to dialout group (if it doesn't work, add it also to tty group):

sudo adduser $USER dialout

Install using flatpak package

flatpak install flathub cc.arduino.IDE2  # cc.arduino.arduinoide for v1.x

Install using Ubuntu Make (on GitHub)

Ubuntu Make is a command line tool which allows you to download the latest version of popular developer tools on your installation

  1. Install Ubuntu Make

     sudo apt install ubuntu-make
    

    If not using Ubuntu 18.04+ or want the latest versions:

     sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
     sudo apt update
    
  1. Install Arduino IDE with umake

     umake electronics arduino
    

Warning: umake ide arduino is deprecated.

This will install it on ~/.local/share/umake/electronics/arduino. If you don't get the shortcut available you'll need to run install.sh found there.

Some other software options (like Eagle or Sublime) are not free software. I recommend instead Fritzing and VSCodium (a community-driven, freely-licensed binary distribution of Microsoft’s editor VS Code).

Install using arduino.cc

Just follow official guide (or Canonical's tutorial):

  1. Download the Arduino Software (IDE). lscpu will tell you if 32 or 64 bits. If unsure, use 32 bits.
  2. Extract the package (from terminal tar -xvf arduino-1.8.2-linux64.tar.xz).
  3. Run the installation script (./install.sh).

[1]: http://arduino.esp8266.com/p

Install using snap package

sudo snap install arduino

If you need any other Python 3 dependencies other than serial, you can install them inside the snap sandbox using the arduino.pip command.

Notes


8
  • For anybody who already installed from Downloads as I did, you can still use this to move it and run the installer again to update the desktop shortcut. Nov 18, 2017 at 16:02
  • Make sure to setup permissions on tty, see this answer
    – PeterM
    Feb 11, 2018 at 16:04
  • 1
    "Install latest version" step 2 should now be umake ide arduino
    – Escher
    Jul 5, 2018 at 7:54
  • @Escher That might be true with older versions, but not with umake v18.05: WARNING: Arduino is now in the electronics category, please refer it from this category from now on. This compatibility will be dropped in the future. Jul 5, 2018 at 18:01
  • Odd, I just installed 1.8.5; it was not in the electronics category.
    – Escher
    Jul 7, 2018 at 8:37
14

This is from notes I took when installing an Arduino. It was very helpful when I had to go through the same thing with other computers.

Install Sketch which is used to program Arduinos.
Use one of the following methods.

sudo apt-get install arduino  

or

sudo apt-get install arduino-core  

or
Open "Ubuntu Software Center" Search "arduino"

Set up the vendor ID.
Without Arduino plugged in

lsusb  

This is what I got

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub   
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub  
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub  
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Again with Arduino plugged in.

lsusb   

This is what I got

Bus 004 Device 003: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub   
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub  
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub  
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub  

Look at the addition line.
It will look something like this

Bus 004 Device 003: ID 2341:0043  

Insert the numbers that you have in the command below.

sudo modprobe usbserial vendor=0x2341 product=0x0043 

Let's get the serial port to work

cd /dev  

Without Arduino plugged in

ls

Again with Arduino plugged in.

ls  

Look for the additional tty* NAME. Mine was ttyAMC0, yours may be ttyUSB* or ttyS*.

Now we know which port it is trying to use.

The following is used to log the serial input from the Arduino. You may not need it.

sudo apt-get install minicom

//It may be already installed on your computer.

sudo minicom -s  

You will get a setup menu.

Change first line with /dev/ttyAMC0 or whatever you found in your /dev/ directory.

Save setup as dfl.

I don't know what this does I just read it somewhere and it worked.

It is on ttyACM0. When I looked at the directory /dev I found that ttyACM0 would come and go when the Ardunio was plugged in or taken out.

Install kst //This program will take a your ascii file and put it on chart.
sudo apt-get install kst

newer version will be available at some date.

Install GtkTerm

sudo apt-get install gtkterm

Configure GtkTerm to the port which Arduino is connected to. The Arduino needs to be plugged in and the serial reader in Sketch can't be on.

You should be seeing the ascii numbers scrolling on GtkTerm.

Configure the GtkTerm to log the information to a text file.

If you open the text file now you should see the data in the file. I can't remember if GtkTerm needs to be pause to read this.

Open kst. Use Data wizard to connect to the data text file with ascii.
The data should be column 1.
From here your on you own.

5
  • In my case it is ttyACM0 instead of ttyAMC0. I think in your case too. A typo? Thank you for the post.
    – LRDPRDX
    Nov 30, 2017 at 12:08
  • One more question. After changing serial port in minicom and saving as dfl. I see minicom opened with several lines ended with `Press CTRL-A Z for help on special keys. What should I do?
    – LRDPRDX
    Nov 30, 2017 at 12:13
  • I do not see any ascii data on gtkterm window. It should be simply because arduino is plugged in?
    – LRDPRDX
    Nov 30, 2017 at 12:27
  • And it gives you an extremely ancient version of arduino.
    – ar2015
    Dec 7, 2019 at 8:05
  • I didn't have to do much of that. sudo apt install arduino, then upon opening the IDE I got asked to do something to setup serial port, restart computer, done. Even worked out of the box with my CH340G clone (although I did have platformio already installed, that might be why)
    – Nicolas
    Jan 25, 2021 at 1:09
2

As of Ubuntu 16, my best luck has come with the software center, but don't install Arduino IDE if it comes up. You will want to install arduino-mhall. It should look something like this:

enter image description here

I tried various other methods here, and had all sorts of problems. This one just worked and I've been happily making stuff with my Arduino ever since.

1

Is this not what you're looking for? Is universe not enabled in your software update prefs? From Precise.

$ apt-cache show arduino
Package: arduino
Priority: optional
Section: universe/electronics
Installed-Size: 881
Maintainer: Ubuntu Developers 
Original-Maintainer: Scott Howard 
Architecture: all
Version: 1:1.0+dfsg-5
Depends: default-jre | java6-runtime, libjna-java, librxtx-java (>= 2.2pre2-3), arduino-core (= 1:1.0+dfsg-5)
Recommends: extra-xdg-menus, policykit-1
Filename: pool/universe/a/arduino/arduino_1.0+dfsg-5_all.deb
Size: 684106
MD5sum: 5dd5fe5e36013a8cab1d47a1f62734cc
SHA1: c86f2453bb4b41f9bf1dade070fd0b2da140467c
SHA256: 7e9aaf51bf6b69214ba47ff7d077aa668da5b2b38c616e94ffca68b5564e8cc8
Description-en: AVR development board IDE and built-in libraries
 Arduino is an open-source electronics prototyping platform based on
 flexible, easy-to-use hardware and software. It's intended for artists,
 designers, hobbyists, and anyone interested in creating interactive
 objects or environments.
 .
 This package will install the integrated development environment that
 allows for program writing, code verfication, compiling, and uploading
 to the Arduino development board. Libraries and example code will also
 be installed.
Homepage: http://www.arduino.cc
Description-md5: 60f8f72e8783c6b5a72254120b680cdb
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
$ sudo apt-get install arduino
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  arduino-core avr-libc avrdude binutils-avr ca-certificates-java default-jre
  default-jre-headless extra-xdg-menus gcc-avr icedtea-6-jre-cacao icedtea-6-jre-jamvm
  icedtea-netx icedtea-netx-common java-common libatk-wrapper-java libatk-wrapper-java-jni
  libftdi1 libgif4 libjna-java librxtx-java openjdk-6-jre openjdk-6-jre-headless
  openjdk-6-jre-lib ttf-dejavu-extra tzdata-java
Suggested packages:
  avrdude-doc binutils task-c-devel gcc-doc gcc-4.2 equivs libjna-java-doc icedtea-plugin
  libnss-mdns sun-java6-fonts ttf-baekmuk ttf-unfonts ttf-unfonts-core ttf-sazanami-gothic
  ttf-kochi-gothic ttf-sazanami-mincho ttf-kochi-mincho ttf-wqy-microhei ttf-wqy-zenhei
  ttf-indic-fonts-core ttf-telugu-fonts ttf-oriya-fonts ttf-kannada-fonts ttf-bengali-fonts
Recommended packages:
  policykit-1
The following NEW packages will be installed:
  arduino arduino-core avr-libc avrdude binutils-avr ca-certificates-java default-jre
  default-jre-headless extra-xdg-menus gcc-avr icedtea-6-jre-cacao icedtea-6-jre-jamvm
  icedtea-netx icedtea-netx-common java-common libatk-wrapper-java libatk-wrapper-java-jni
  libftdi1 libgif4 libjna-java librxtx-java openjdk-6-jre openjdk-6-jre-headless
  openjdk-6-jre-lib ttf-dejavu-extra tzdata-java
0 upgraded, 26 newly installed, 0 to remove and 315 not upgraded.
Need to get 56.6 MB of archives.
After this operation, 175 MB of additional disk space will be used.
Do you want to continue [Y/n]? 
1

If you are installing the latest version (version 1.8.2) of the Arduino IDE, there is a file-naming error in the script which results in the error message:

cc.arduino.arduinonoide does not exist

When I looked in Arduino-1.8.2 64/lib there is no file cc.arduino.arduinonoide.xml but there is a file named arduino-arduinonoide.xml

The solution is to open install.sh in your editor of choice and change RESOURCE_NAME=cc.arduino.arduinoide to RESOURCE_NAME=arduino-arduinoide (and save the changes).

Now, ./install.sh can be run in the terminal without a hitch.

I understand that this problem will be fixed in release 1.8.3


The full installation process is thus:

Download the Aduino IDE from the Arduino website (selecting the 32-bit or 64-bit version according to your needs).

Navigate to your downloads folder:

cd ~/Downloads

edit the install.sh script as described above to correct the problem with RESOURCE_NAME:

cd arduino-1.8.2 64
nano install.sh

Make the changes as explained above, then save and exit.

Move the Arduino-1.8.2 64 installation folder from your /downloads folder to the /opt/ directory: and then navigate to the new folder:

cd ..
sudo mv arduino-1.8.2 64 /opt
cd /opt/arduino-1.8.2 64/

Make install.sh executable:

chmod +x install.sh

and then run the script:

./install.sh

The Arduino IDE should now be installed and you should see the icon on your desktop.

0

To get your Arduino working in ubuntu, just search "Arduino IDE" in the software center. Find it, and click install. You should then be able to get your Arduino working. Hope this helps!

0

First, you need to go to http://arduino.cc/hu/Main/Software. Then, download the Linux version of Arduino 1.0 for Linux. Next, extract the folder arduino-1.0 from the downloaded archive. Now, you just need to double click on the arduino file, choose Run from the dialog box that opens, and you're done! Arduino should now open.

If after extracting it is not working then Goto arduino 1.0 folder from your terminal and write

./arduino

it should now open.

0

Since February 2020, the easiest way to install the latest Arduino IDE is to use the Arduino snap:

snap install arduino

Then add your user to the dialout group:

sudo usermod -a -G dialout $USER

After this, reboot your device and open Arduino IDE.

A note about Python support

The Arduino IDE snap runs inside a sandbox for security and stability reasons. This means it cannot access the Python libraries on your device. The snap bundles Python 3 and the serial library. If you need any other Python dependencies, you can install them inside the sandbox using the arduino.pip command.

arduino.pip install <package-name>

Note: do not use sudo for this command

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .