Setting Up the Arduino IDE

Table of Contents

  1. Download and install the Arduino IDE
    1. Step 1: Download and install
    2. Step 2: Open the IDE
    3. Step 3: Select your Arduino board and port
    4. Stop and double check the following
  2. Customize the IDE
    1. Theme
    2. Text size
  3. Troubleshooting
    1. Couldn’t find a Board on the selected port
    2. Arduino Leonardo port doesn’t show up
  4. Arduino is open source

The Arduino IDE (Integrated Development Environment) is where you’ll write, compile, and upload code to your Arduino board. This page walks through downloading, installing, and configuring the IDE so you’re ready to start programming.

Download and install the Arduino IDE

Step 1: Download and install

Download and install the Arduino IDE 2 for Mac, Windows, or Linux from the Arduino Software page. We will not be using the cloud version (the “Arduino Cloud Editor”), so please download and install the version that runs locally on your machine.

Arduino IDE download page screenshot Figure. The Arduino download page. As of April 1, 2026, the current version is 2.3.8 but nightly builds are also available. And the IDE source code itself is even open source and viewable on GitHub.

The legacy Arduino IDE (1.x) is also available on the download page. Some older online tutorials reference it, but we recommend using Arduino IDE 2 for these lessons. If you encounter a tutorial showing a different-looking IDE, it’s likely using the 1.x version—the core concepts (compiling, uploading, setup()/loop()) are the same.

Step 2: Open the IDE

After installation is complete, open the Arduino IDE. You’ll see a code editor with two blocks of code (called functions):

  1. The first block is setup(), which is called once and only once when the Arduino is turned on or reset.
  2. The second block is loop(), which is called as soon as setup() completes. When loop() completes, it’s automatically called again and again (until the Arduino is turned off). Want to learn more? Read Inside Arduino.

Screenshot of the Arduino IDE with an empty sketch showing setup() and loop() functions Figure. When you first create a new project in the Arduino IDE, the initial code template is composed of a setup() function, which is called once when the Arduino is turned on or reset, and a loop() function, which is called continuously.

The Arduino IDE 2 also includes a sidebar with quick access to the Board Manager, Library Manager, Serial Monitor, and your Sketchbook—we’ll use some of these in later lessons.

For those who have used Processing—a programming environment for digital artists and creators (and a favorite of mine)—the setup()/loop() code structure should seem familiar. The classic Arduino IDE (1.x) was actually written in Java and derived directly from Processing. The current IDE 2.x is a complete rewrite built on Theia and Electron, but it preserves the same setup()/loop() programming model.

Processing p5js
Screenshot of the Processing IDE Screenshot of p5js IDE
A screenshot of the Processing IDE A screenshot of the p5.js IDE

Step 3: Select your Arduino board and port

Plug in your Arduino via USB. In IDE 2, the board and port can be selected from the dropdown at the top of the window. When you plug in an Arduino, the IDE will often auto-detect it and display something like “Arduino Leonardo on COM3” or “Arduino Uno on /dev/cu.usbmodem14101”. Click the dropdown to verify or change the selection.

You can also select the board and port via Tools -> Board and Tools -> Port.

Screenshot showing how to select your Arduino board in the Arduino IDE 2 Figure. The Arduino IDE should recognize your board as soon as you plug it into your computer.

Port can change! The port assigned to your Arduino can change if you switch USB ports, restart your computer, or unplug and replug the board. If you get an upload error, check your port selection first.

Stop and double check the following

A significant number of frustrating hours are wasted because of the following three issues. Before asking for help, please verify each one:

  1. The incorrect Arduino board was selected. Double check this. For example, there are two Arduino Leonardo options: “Arduino Leonardo” and “Arduino Leonardo ETH”. You must select the regular “Arduino Leonardo” board.

  2. The incorrect port was selected. Sometimes your port selection gets reset. Other times, your Arduino gets moved to a different port. If you get an uploading error, check this first!

  3. Using a non-data USB cable. You must use a USB cable that provides data, not just one that provides power. Some cheap USB cables—which are largely sold to charge mobile phones—save on costs by not including the data wires in the USB spec. If your Arduino powers on but doesn’t show up in the port list, try a different cable.

Customize the IDE

Theme

The Arduino IDE 2 includes built-in theme support. To switch to a dark theme, go to File -> Preferences (or Arduino IDE -> Settings on macOS) and change the Theme dropdown. There are several options including “Dark,” “Light,” and “High Contrast.”

Screenshot of Arduino IDE 2 Preferences showing theme options Figure. The Arduino IDE natively supports a number of themes, including light, dark, and high contrast modes.

Text size

You can also adjust the editor font size in File -> Preferences by changing the Editor Font Size value. This is helpful when presenting code over Zoom or a projector.

Troubleshooting

Couldn’t find a Board on the selected port

If you click the Upload button but receive a “Couldn’t find a Board on the selected port” error, double check that the correct board and port are selected (see Step 3 above). Also verify that your USB cable supports data transfer.

Screenshot of the "Couldn't find a Board on the selected port" error in the Arduino IDE Figure. Screenshot of the “Couldn’t find a board on the selected port” problem.

Arduino Leonardo port doesn’t show up

First, check that your USB cable provides both power and data. Some cheaper cables are power only.

Second, the Leonardo (and other boards using the ATmega32u4 microcontroller) uses a virtual serial port that disappears briefly when the board resets. This can sometimes confuse the IDE. If the Leonardo’s port doesn’t appear, try the following:

  1. Open the Blink example sketch (File -> Examples -> 01.Basics -> Blink)
  2. Select “Arduino Leonardo” as your board
  3. Press and hold the physical reset button on the Leonardo
  4. Click Upload in the IDE
  5. When you see “Uploading…” appear in the status bar, release the reset button

This gives the IDE a chance to catch the bootloader’s virtual port during the brief reset window. If this works, the Leonardo should be fixed for normal uploads going forward.

For more details on why this happens (the Leonardo’s bootloader creates a temporary virtual serial port during reset), see the official Arduino upload troubleshooting guide.

Arduino is open source

The entire Arduino ecosystem is open source and hosted on GitHub. This includes the Arduino IDE itself, the board cores that define how code compiles for specific microcontrollers (like the ATmega328P on the Uno), the language reference, and even the documentation at docs.arduino.cc. As a CS student, browsing these repositories can be a great way to learn how an embedded toolchain works under the hood—from how digitalWrite() is actually implemented in C to how the IDE communicates with your board.

Screenshot of the Arduino GitHub organization page Figure. The Arduino GitHub organization hosts open-source code for the IDE, board cores, libraries, and documentation.


This website was developed by Professor Jon E. Froehlich and the Makeability Lab using Just the Docs. If you found the website useful or use it in your teaching, we'd love to hear from you: jonf@cs.uw.edu. This website and all code is open source (website GitHub, Arduino GitHub, p5js GitHub). You can find the MakeabilityLab_Arduino_Library here. Found an error? File a GitHub Issue.

Made with ♡ by the The Makeability Lab logo which is a large geometric M with an embedded L