Setup the Arduino IDE

programming

Before we can dive into programming we need to fulfill the prerequisites. This tutorial will show you how you can install the Arduino IDE and the required drivers.

Different Arduino Uno Boards

To program the Arduino Uno we will use the Arduino IDE. This tutorial will guide you step-by-step through the installation process.
As the Arduino is programmed via serial port and the on-board USB-to-Serial converter, you need to install a driver for this converter too. What might surprise you is, that there are different versions of the Arduino Uno. First there are SMD versions and versions using the ATmega328P microcontroller as a DIP package. More important for connecting it to your computer is the fact, that the original Arduino Uno uses an ATmega16U2 microcontroller as USB-to-Serial converter, while other boards use a cheaper CH340 converter chip.
The Arduino IDE setup only includes the driver for the original Arduino board. You can identify the chip your Arduino Uno uses using the picture below. If you have an Arduino Uno with the CH340 converter, it might not work out of the box. In this case just follow the optional step 'Install CH340 drivers'.

Arduino boards with USB-to-Serial converters

Arduino IDE Installation (Windows)

Arduino IDE Installation (Ubuntu)

You can choose to install the Arduino IDE for all user or to keep it in your home directory.
To install the Arduino IDE for all users follow the three-step process described in step 3a. It uses the official Arduino installation script. This script will create a shortcut to the Arduino IDE on the desktop for all users. This shortcut links to the Arduino IDE installation directory. In order to ensure that all users have access to this directory, you should move it to a globally accessible location like /opt. After you copied the Arduino IDE files to this new place you can remove the files from your home directory.
If you do not want to install the Arduino IDE for all users you can move it to a desired location in your home directory. Step 3b will show you how to create a desktop shortcut or simply run the Arduino IDE from its installation directory.

No matter which option you choose, you need to ensure that your user account has access to the serial port in order to program the Arduino. Typically, this is achieved by adding the user to the dialout group and adding additional udev rules. Arduino provides a script for this. The process is described in step 4 and requires you to use an account with access to sudo.

Previous Post Next Post