Arduino: Lesson-03 Getting Started with the Arduino Desktop IDE

Introduction:

Before we start controlling the world of Arduino, we’ll need to set up the software (IDE – Integrated Development Environment) to program the Arduino boards. The Arduino IDE allows us to write programs on our computers and upload them to our boards. As of writing this tutorial, there are two options of the IDE:

  1. Desktop IDE (V 1.8.6)

This is the offline version of the IDE that most people who prefer to work offline would opt for. You should always use the latest version of the IDE that can be downloaded here …. https://www.arduino.cc/en/Main/Software.

  1. Online IDE (Arduino Web Editor)

This is the online version of the IDE that you should use if you have a reliable internet connection. The web editor allows you to save your sketches on the cloud, which means your projects will be backed up and readily available from any device. It is always updated automatically and as a user, you don’t need to install updates or community generated libraries. Also note that Boards work out-of-the-box on the web editor, you don’t need to install anything. How cool is that?

  • Installing the Arduino Desktop IDE:

In the previous tutorial, we observed that Arduino is cross-platform i.e. it can run on Windows, Mac & Linux Operating systems. For the purpose of this tutorial we are going to concentrate on how to install the IDE on Windows PCs and also the board we’ll cover here is the Arduino Uno/Genuino. In case you have a Mac follow the instructions here https://www.arduino.cc/en/Guide/MacOSX. For Linux users, follow the installation instructions here https://www.arduino.cc/en/Guide/Linux.

     2.1   For Windows PCs:

Step 1:

Download the latest version of the Arduino software (IDE) from the download page at https://www.arduino.cc/en/Main/Software. While at the site, you have two options to choose from i.e. the installer (.exe) or the zip package. For this tutorial, we’ll download and use the installer that installs directly everything we need to use the Arduino Software (IDE), including the drivers. Unlike the Installer, with the Zip package, we have to install the drivers manually and also it’s useful if we want to create a portable installation.

Fig 1. Arduino Desktop IDE Download Page

Step 2:

When the download is complete, go ahead with the installation and allow the driver installation process to run when prompted by the operating system by selecting the components to install.

Fig 2.  Locating the application on your disk drive

Step 3:

Click the “I Agree ” button to accept the license agreement.

Fig 3.  The license Agreement

Step 4:

Select the components to be installed on your computer.

Fig 4.  Selecting components to be installed

 

Step 5:

Choose the installation directory, we suggest you keep the default directory.

Fig 5.  Choosing the installation directory

Step 6:

The process will extract and install all the required files and you will be prompted to install drivers that are required to execute properly the Arduino Software (IDE).

Fig 6.  Extracting the required files

Fig 7.  Promoted drivers to be installed

Step 7:

When the installation is complete, close the setup and start the Arduino IDE

Fig 8.  The Arduino Desktop IDE

Step 8:

After the Arduino Software (IDE) is properly installed on yours Windows PC, we then need to learn how to connect our Uno/Genuino board to the computer and upload our first sketch.

Connect your Uno/Genuino board with an A-B USB cable and the green power LED (labelled PWR) should light up as shown below.

Fig 9.  Connecting the Arduino Uno board to your computer via a USB cable

 

Step 9:

Install the board drivers:

If you downloaded the installer, (Windows – from XP up to 10), this will install the drivers automatically as soon as you connect the board to your computer. But if for some reason, you decided to download and extract the Zip package, and the board is not properly recognized, then follow the procedure below;

  1. Click on the Start Menu and open the control panel.
  2. While in the control panel, navigate to system and security and click on System, then open the device manager.
  • Check under ports (COM & LPT), you should see an open port named “Arduino UNO (COMxx)” and if there is no COM & LPT section, then check under “Other Devices” for “Unknown Device”.
  1. Right click on the “Arduino UNO (COMxx)” port and choose the “Update Driver Software” option.
  2. Then choose the “Browse my computer for Driver Software” option.
  3. Then navigate to and select the driver file named “arduino.inf”, located in the “Drivers” folder of the Arduino Software download (not the “FTDI USB Drivers” sub-directory). If you are using an old version of the IDE (1.0.3 or older), choose the Uno driver file named “Arduino UNO.inf”.
  • Finally windows will finish up the driver installation from there.

Step 7:

The Anatomy of the Arduino Desktop IDE.

Fig 10.  The anatomy of the Arduino Desktop IDE

Parts of the IDE:

  1. Menu – Selection of software features.
  2. Verify – Compiles and verifies your sketch.
  3. Upload – Sends the verified code to the Arduino board.
  4. New – Opens a new sketch window.
  5. Open – Opens an existing sketch.
  6. Save – Saves the current active sketch.
  7. Sketch Name – Shows the name of your saved sketch.
  8. IDE Version – Shows the current version of the IDE you are using.
  9. Serial Monitor – Opens a window to send and receive information.
  10. Code Editor – This is the code editor area. Type your sketch in this area.
  11. Status Bar – The IDE reports verifying and uploading message here.
  12. Console – The IDE reports any failures or success message here.
  13. Selected Board – Indicates the board selected.
  14. Port – Shows the COM serial port active.

Step 8:

Open your first sketch, let’s open the LED blink example sketch: File > Examples > 01.Basics > Blink.

Fig 11.  Opening the LED blink example sketch

 

Step 9:

We then need to select the board type and port. Tools > Board > Arduino/Genuino Uno.

Fig 12.  Selecting your preferred board type

Then select the serial device of the board from the Tools > Serial Port menu. This is likely to be COM3 or higher (COM1 and COM2) are usually reserved for hardware serial ports. To find out, you can disconnect your board and re-open the menu; the entry that disappears should be the Arduino/Genuino Uno board. Reconnect the board and select that serial port.

Fig 13.  Selecting the Serial COM port

Step 10:

The final step is to upload the program. Simply click the “Upload” button in the IDE and after a few seconds, you should see the RX and TX LEDs on the board flashing. If the upload is successful, the message “Done uploading” will appear in the status bar. A few seconds after the upload is complete, Pin 13 LED on the board will start to blink in orange. If it does, then CONGRATULATIONS!, you have successfully setup your Arduino/Genuino Uno board. In case of any errors, please re-follow the instructions in this tutorial once again.

     3.0   Conclusion:

Now that you have set up and programmed your Arduino/Genuino Uno board, you may find inspiration in our DIY Arduino projects with lots and lots of open source tutorials & projects to get you started with building your own home-made Arduino projects.

In the next chapter, we are going to get acquainted with the Arduino Web Editor.

 

 

Tum Kurtzman
Author: Tum Kurtzman

Computer Engineer, Ugandan Life Hacker, Tech Blogger, YouTuber, Founder & Lead Engineer @ SonaLabs.....

Leave a Reply