🚀 Getting Started with ESP32 & Arduino IDE

A complete beginner-friendly guide to setting up your board and uploading your first program

1. Introduction

The ESP32 is a powerful, low-cost microcontroller with built-in Wi-Fi and Bluetooth, widely used in IoT (Internet of Things) projects. Before you can write and run programs on an ESP32-based board — such as the popular Adafruit Feather HUZZAH32 — you need to prepare your computer by installing the Arduino IDE and adding ESP32 support to it.

Goal of this guide: Install the Arduino IDE, add ESP32 board support, connect your board, and upload your very first program — a simple LED "Blink" sketch.

1Install the Arduino IDE

The Arduino IDE (Integrated Development Environment) is the software you use to write, compile, and upload code to your ESP32 board. If you already have it installed, you can skip this step.

Steps to Install

1. Open your browser and go to arduino.cc 2. Click on "Software" 3. Choose the installer for your OS (Windows 7 and newer) 4. Click "Just Download" (skip donation if not needed) 5. Run the downloaded installer file 6. Click "I Agree" on the license screen 7. Keep the default installation folder 8. Click "Install" 9. Click "Yes" to any driver installation prompts 10. Wait for installation to complete (~2 minutes)
It is recommended to install the IDE offline on your computer rather than relying solely on a cloud-based editor, so that you can keep working even without an internet connection.

2Add the ESP32 Board URL to Preferences

By default, the Arduino IDE only supports official Arduino boards. To add support for ESP32-based boards, you must tell the IDE where to find the ESP32 board definitions by adding a special URL into the Preferences window.

Board Manager URL

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

Steps to Add the URL

1. Open Arduino IDE 2. Go to File 3. Click Preferences 4. Locate "Additional Board Manager URLs" field 5. Paste the ESP32 board URL into the field 6. Click OK
File Preferences Additional URLs Paste Link OK

3Install the ESP32 Board Package

Once the URL is added, the Arduino IDE knows where to download ESP32 board definitions from. Now you need to actually install the package using the Board Manager.

Steps to Install ESP32 Package

1. Go to Tools 2. Click Board 3. Click Board Manager 4. Search for "ESP32" 5. Select the latest version (e.g. 2.0.1) 6. Click Install 7. Wait for the download to finish (~149 MB)
Note: Installing ESP32 support downloads an entirely new compiler toolchain, so the download size is relatively large. This may take several minutes depending on your internet speed — this is normal and only needs to be done once.

4Connect the Board & Verify Drivers

While the ESP32 package is downloading, you can connect your board to your computer using a micro-USB cable. Most ESP32 boards use a USB-to-serial bridge chip (commonly the Silicon Labs CP210x) to communicate with your PC.

Steps to Verify the Driver

1. Connect the ESP32 board via micro-USB cable 2. Open Device Manager on your computer 3. Look under "Ports (COM & LPT)" 4. Check for "Silicon Labs CP210x USB to UART Bridge" 5. Note the COM port number shown
If the COM port does not appear, you likely need to manually install the CP210x USB to UART Bridge driver, which is freely available online and simple to install.

5Select Your Board and Port

After installation, you need to tell the Arduino IDE exactly which ESP32 board you are using and which COM port it is connected to.

Steps to Select the Board

1. Go to Tools 2. Click Board 3. Select "ESP32 Arduino" 4. Choose "Adafruit ESP32 Feather" (or your specific board) 5. Go to Tools again 6. Click Port 7. Select the matching COM port (e.g. Silicon Labs CP210x)
Most ESP32 development boards include a built-in LED. On boards like the Adafruit Feather HUZZAH32, this LED is typically connected to GPIO Pin 13. This will be important for our first program.

6Understanding Arduino Program Structure

Every Arduino/ESP32 program (called a "sketch") is built from two essential functions:

void setup()

Runs only once when the board powers on or resets. Used for initialization — setting pin modes, starting Wi-Fi, configuring sensors, etc.

void loop()

Runs repeatedly forever after setup() finishes. This is where your main program logic lives — for example, reading sensors and sending data continuously.

Example Analogy: Temperature Logger

Imagine you're building a cloud-connected temperature logger. Connecting to Wi-Fi and initializing the sensor only needs to happen once, so it goes in setup(). But reading the temperature, sending it to the cloud, and waiting a few seconds needs to repeat forever, so that logic goes in loop().

Power On void setup()
(runs once)
void loop()
(runs forever)

Summary

You have now successfully installed the Arduino IDE, added ESP32 board support, connected your board, verified drivers, and uploaded your first program. This foundational setup is the starting point for all future ESP32 projects — from simple LED blinking to complex IoT applications involving sensors, Wi-Fi, and cloud connectivity.

Install IDE Add Board URL Install ESP32 Package
Connect Board Select Board/Port Upload Blink Sketch