Session 6 · Installing the Arduino IDE
Installing the Arduino IDE
The Arduino IDE is the program you use to write code for an Arduino board, compile it and upload it to the board over USB. We use it in Session 6 (Nov 7) to drive motors and sensors. Please install it before class and do the "Check" step below. You can do the check even without a board.
Check your computer
- Windows: Windows 10 or later, 64-bit. Almost all recent laptops qualify.
- Mac: Apple menu in the top left → About This Mac. If Chip shows Apple M1/M2/M3/M4, it's Apple Silicon. If Processor shows Intel, it's Intel.
Download
On arduino.cc/en/software, click Download under Arduino IDE 2 and pick the file for your computer. The current version is 2.3.10, and the file is 150 to 200MB.
| Computer | File to download |
|---|---|
| Windows | The Windows 64-bit installer (.exe) |
| Mac, Apple Silicon | The .dmg for macOS Apple Silicon |
| Mac, Intel | The .dmg for macOS Intel |
Install
Windows
- Double-click the
.exefile you downloaded. - If a blue "Windows protected your PC" window appears, click More info → Run anyway.
- Click I Agree on the license, keep the defaults with Next, and finish with Install.
- Start Arduino IDE from the Start menu.
- On first launch, a "Would you like to install this device software?" window appears a few times. These are the drivers that let the computer recognize the board over USB, so click Install each time. If a firewall window appears, click Allow.
Mac
- Double-click the
.dmgfile you downloaded. - Drag the Arduino IDE icon into the Applications folder.
- Open Arduino IDE from the Applications folder. If you see "downloaded from the Internet", click Open.
- If it asks whether to accept incoming network connections, click Allow.
On first launch, a notice about downloading board files briefly appears in the bottom right. Wait for it to finish before moving on.
Check
Make sure compiling works without a board. Compiling downloads a few more files the first time, so doing this at home saves time in class.
- File → Examples → 01.Basics → Blink. The example code opens in a new window.
- Click Select Board at the top center, then Select other board and port....
- Type
unoin the search box on the left, choose Arduino Uno and click OK. Leave the port empty. - Click the ✓ (Verify) button in the top left.
If the output panel at the bottom shows a line starting with Sketch uses ... bytes, the install worked. The first time can take a minute or two.
In class: connecting the board
When you get a board, plug it into your computer with a USB cable and do the following.
- Click Select Board. The board you plugged in shows up with its port. Choose it.
- Port names on Windows:
COMplus a number, such asCOM3orCOM4 - Port names on Mac:
/dev/cu.usbmodem…or/dev/cu.usbserial…
- Port names on Windows:
- If a notice in the bottom right asks to install the package for this board, click Install.
- With the Blink example open, click the → (Upload) button.
- If the output panel shows
Done uploadingand the small LED on the board blinks once a second, it worked.
When the port doesn't show up or upload fails
- Try a different USB cable first. A charge-only cable powers the board, but the computer can't see it. This is the most common cause.
- Unplug any USB hub or adapter and plug the board straight into the laptop. Try another USB port too.
- Compatible boards (with CH340 written on the chip) may need a separate driver.
- Windows: If Device Manager → Ports (COM & LPT) or Other devices shows
USB2.0-Serialwith a yellow exclamation mark, download the WCH driver (CH341SER.EXE), click INSTALL, and plug the cable back in. - Mac: If the port list has no
cu.usbserialorcu.wchusbserial, install the WCH Mac driver, allow it in System Settings → Privacy & Security, and restart.
- Windows: If Device Manager → Ports (COM & LPT) or Other devices shows
- If upload shows an
avrdudeorprogrammer is not respondingerror, choose the board and port again in Select Board, unplug and replug the cable, and upload again.