Install Arduino IDE on Ubuntu 18.04
I had to get an Arduino IDE up and compiling on a Kubuntu 18.04 install. In order to not forget what I did, I made this little post.
This is not super detailed but it should get the job done.
Open a terminal and let’s do a few things.
Uncompress the software (cd to your Downloads directory) using ark:
I moved the resulting folder to /opt so it would not litter up my home directory. You will likely need to use sudo.
sudo mv arduino-*/ /opt/
Since we will be working out of that directory now, let’s move into it.
Again, we will leverage sudo to get this installed. Run the install.sh script.
Once the script completes you should have a new electronics category in your Applications menu with the Arduino IDE.
Open the IDE and make sure it opens appropriately. You are not ready to compile and upload to your board yet. We have a few more steps.
Open the preferences in the Arduino IDE (File -> Preferences). Here you can modify the interface scale to make sure you easily read the screen and code.
Now close the IDE and let’s make sure you can write out across the USB serial line.
Open a terminal again and let’s look at a few things. First notice that your home directory now has an Arduino directory. Inside that directory is the libraries directory. That is where you put your downloaded arduino libraries if you need to download any. That is outside the scope of this document, but now you know where they go.
You should connect via /dev/ttyUSB0 (or 1 or 2, etc.). To make the Arduino IDE work, we will need to add your user to the dialout group and make sure you can read and write to /dev/ttyUSB0. Here are the commands to do accomplish those tasks.
sudo usermod -a -G dialout $USER sudo chmod a+rw /dev/ttyUSB0
Now reopen your Arduino IDE and compile a sketch. Yuu should be able to write it to your board.