Starting Electronics needs your help! Please make a donation to help cover our hosting and other costs. Click the donate button to send a donation of any amount.
Created on: 5 January 2022
How to install the Arduino IDE software application for writing Arduino sketches. Install the Arduino IDE and load a test sketch to the target board. Software called the Arduino IDE (Integrated Development Environment) is used to load programs to Arduino boards. A program that runs on an Arduino board is called a sketch. Many example sketches come with the Arduino IDE. Modify these sketches to suit your application. Also write your own sketches from scratch.
Part 2 of the Arduino Tutorial for Beginners
Install the Arduino IDE software to a computer in this second part of the Arduino tutorial for beginners. It follows the first part of the Arduino tutorial for beginners. Use the Arduino IDE to load a sketch to an Arduino Uno, or an Arduino MEGA 2560. The following image shows the Arduino IDE application window. An example sketch is open in the Arduino IDE window in the image.
Go to the Arduino software downloads page. Find download links to the latest Arduino IDE near the top of the page. Details on installing the software follow in the next section. Windows, Linux and Mac computers all have a ZIP file version of the Arduino IDE. The Arduino IDE can optionally be installed using an executable download file on a Windows computer. Alternately, the Arduino IDE can be installed from the Microsoft app store. Leave the Arduino software downloads page open. Meanwhile read the next section for installation instructions.
Instructions on how to install the Arduino IDE software follow for different operating systems. Information on getting started with the Arduino IDE is also provided by Arduino on the Getting Started with Arduino page.
Two options for installing the Arduino IDE on a Windows computer follow. Either install from the executable, explained first below. Alternately, install using the ZIP file, explained in the second sub-section that follows.
On a Windows computer, Arduino suggest installation using the executable installer (.exe). The reason for this is that it also installs the drivers. To use this installation method, click the top download option on the Arduino software downloads page, as shown in the following image. A red dot marks the executable download link in the following image.
After clicking the link, a web page opens. On this page, either make a donation and download. Alternately, click the JUST DOWNLOAD button to download immediately. Locate the downloaded file using Windows file manager after the download finishes. At the time of writing this tutorial, the file name is arduino-1.8.19-windows.exe. The version number in this file name changes whenever the IDE software is updated. Therefore the file you downloaded may have a different name. Double-click the file to start the installation.
Windows prompts with a dialog box that says: Do you want to allow this app to make changes to your device? Click the Yes button in the dialog box.
In the next dialog box that opens, click the I Agree button to accept the License Agreement.
The next dialog box is the Installation Options box. If you don’t want a Desktop shortcut to be created, then uncheck this option. Otherwise, leave all of the options checked in this dialog box. Click the Next button.
In the Installation Folder dialog box, leave the default destination folder as is. Finally click the Install button.
It takes a few minutes for the installation to complete. A dialog box pops up at the end of the installation. It prompts with: Would you like to install this device software? Click the Install button. The same dialog box pops up for a second and third driver. Click the Install button in both instances.
After the drivers have finished installing, click the Close button. The Arduino IDE software installation is now complete.
See the Arduino IDE Windows installation guide for alternate installation instructions.
An alternative to installing the Arduino IDE software using the executable installer on a Windows computer is to use the ZIP file. Simply click the Windows ZIP file link. The previous image shows this link. It is the second link, under the one marked with a red dot. Find this on the Arduino software downloads page again.
After downloading the ZIP file, double-click it to open it. Drag the folder from the opened ZIP file to the Windows Desktop. This unzips the folder and places it on the Desktop.
To run the Arduino IDE, first double-click the Arduino IDE folder on the Desktop to open it. Double-click the arduino.exe file in the folder to start the Arduino IDE. If file extensions for known file types are hidden, then this file will appear just as arduino, without the .exe at the end.
Drivers may need to be manually installed later with this type of installation.
For more information on making a portable version of the Arduino IDE software using the ZIP file, see the article on how to create and use a portable version of the Arduino IDE. This installs the Arduino IDE on a USB Flash drive.
Download the correct Arduino IDE ZIP file from the Arduino software downloads page. Most modern Intel architecture computers will use the Linux 64-bit ZIP file. A red dot marks the Linux 64-bit ZIP file link in the following image.
After downloading the ZIP file, extract the folder inside. Copy it to the Linux Desktop or other convenient location. Double-click the arduino file in this folder to start the Arduino IDE.
Add the user to the dialout group to be able to load Arduino programs, or sketches, from a Linux computer to the target Arduino board. Enter the following at the command prompt to add your Linux user name to the dialout group, where <username> is your Linux login user name:
sudo usermod -a -G dialout <username>
After adding your user name to the dialout group, either log out and back in again for the change to take effect. If there are any troubles loading a sketch to the target Arduino board, then try rebooting the computer.
For an alternate Linux installation method that uses an installation script, see the Arduino Linux IDE installation guide. See how to create and use a portable version of the Arduino IDE for a portable Linux installation on a Flash drive.
Click the Mac OS link on the Arduino IDE software download page. This downloads a ZIP file version of the Arduino IDE for Apple Mac computers.
Follow the Arduino Mac OS installation guide to complete the installation.
Test the installed Arduino IDE by loading a sketch to the target Arduino board. The target board is either an Arduino Uno or Arduino MEGA 2560 in this tutorial. The following steps describe how to load a sketch to the board.
Use a type A-B USB cable to connect the Arduino Uno or Arduino MEGA 2560 to the host computer. Host computer refers to the computer that the Arduino IDE is installed on.
Genuine Arduino Uno and MEGA 2560 boards have an ON LED that lights up when the board is plugged into the USB port of a computer. Clone and compatible boards usually have a similar LED that indicates that the board is powered from USB.
Start the Arduino IDE on the host computer. After that, select the Arduino board that you are using. This is either the Arduino Uno, or Arduino MEGA 2560 in this tutorial. Thereafter, select the port that the board is configured as. Board and port selection details follow.
Select Tools → Board → Arduino Uno using the top menu of the Arduino IDE. The Arduino Uno may be found under Tools → Board → Arduino AVR Boards → Arduino Uno, depending on the version of the IDE. This selects the Arduino Uno as the board to program. The port that the board is assigned must now be selected. See Arduino Port Selection that follows the next section.
Select Tools → Board → Arduino Mega or Mega 2560 using the top menu of the Arduino IDE. The Arduino MEGA 2560 may be found under Tools → Board → Arduino AVR Boards → Arduino Mega or Mega 2560, depending on the version of the IDE. When Arduino MEGA is selected for the board, a new item appears on the Tools menu below Boards. This item is called Processor. Make sure that ATmega2560 (Mega 2560) is selected next to the Processor item. This selects the Arduino MEGA 2560 as the board to program. The port that the board is assigned must now be selected, as described next.
Select Tools → Port → <port number> using the top menu of the Arduino IDE. Where <port number> is the port number that the operating system assigned to the board. On windows this is a COM port. For example, COM4. The port could have a different number, such as COM3, COM5, and so on. On a Linux computer, the port may appear as /dev/ttyUSB0, /dev/ttyACM0, or similar. On a Mac the port could be /dev/cu.usbmodem14112 or similar.
Some compatible Arduino boards don’t show the Arduino board name next to the port number. If there is more than one port on the computer and it is not clear which one is the Arduino, then unplug the Arduino board. After that, see which port number disappears from the port list on the Tools menu. Plug the board back in, and the port that reappears in the port list is the Arduino board.
Select File → Examples → 01.Basics → Blink on the top menu of the Arduino IDE. This opens the Blink example sketch in a new Arduino IDE window. When this sketch is loaded to the target Arduino board, it blinks or flashes the on-board LED marked ‘L’.
Click the Upload button in the Arduino IDE to load the Blink sketch to the target Arduino board. The Upload button is the right pointing arrow icon on the Arduino IDE toolbar shown in the following image.
After clicking the Upload button, the sketch is built and uploaded to the target Arduino board. If everything is set up correctly and working, the L LED on the Arduino board starts to blink at a slow rate.
If the sketch does not upload to the board, then make sure that all of the instructions in this part of the tutorial were followed. Check that the board is plugged into the USB port of the host computer, and that the ON LED lights up. Next, check that the correct board and port are selected in the Arduino IDE. Try rebooting the computer if there are still problems. On a Linux computer, make sure that you added your username to the dialout group. Log out and log back in after this. Other problems can be a faulty USB cable, or USB cable that is for charging only, with data not connected.
During the making of this tutorial, the Arduino IDE did not upload to the Geekcreit clone Arduino MEGA 2560 shown in the previous part of this tutorial. An attempt to remedy this problem by burning the bootloader to the board using an external programmer failed when using the Arduino IDE. The solution that got the board working was to load the bootloader to the board using Microchip Studio. This procedure is described in the Ultimate Arduino Mega 2560 Hardware Manual.
The Ultimate Arduino Mega 2560 Hardware Manual for the Arduino MEGA 2560, and the Ultimate Arduino Uno Hardware Manual for the Arduino Uno, both provide much more information on fault finding and testing these Arduino boards than can be covered in this tutorial.
Now that you have discovered how to install the Arduino IDE software on a host computer, and have loaded an example sketch to the target Arduino IDE, you can move to the next part of this tutorial. The following parts of this Arduino tutorial for beginners rely on having a working Arduino IDE installed, and a working Arduino board.
As an Amazon Associate I earn from qualifying purchases:
As an Amazon Associate I earn from qualifying purchases: