The Story
You have an ESP32 board on the desk and Arduino IDE on your computer. This lesson turns that into a working upload path: install the tools, connect the board, send your first sketch, and know what to check when something does not appear.
Background reading
Want to program your ESP32 from Arduino IDE? This guide takes you from a fresh setup to a successful upload, Serial Monitor output, and the next beginner project to build.

You have an ESP32 board on the desk and Arduino IDE on your computer. This lesson turns that into a working upload path: install the tools, connect the board, send your first sketch, and know what to check when something does not appear.
Arduino IDE is the app where you write small programs called sketches. The ESP32 board package teaches Arduino IDE how to compile those sketches for ESP32 boards and upload them through USB.
Author: Abdul Mubeen and the ESP32 Engine editorial team. Last updated: 2026-09-22. Reviewed: educational accuracy and beginner safety. Level: Beginner. Estimated time: 18 min read.
This guide is written for learning and bench prototyping. Check the testing notes before adapting the circuit to different boards, batteries, relays, motors, or outdoor hardware.
This guide is for the moment when you have an ESP32 board and want Arduino IDE to upload code to it. By the end, your computer should recognize the board, Arduino IDE should know about ESP32 boards, and your first sketch should print a message in Serial Monitor.
The path is simple: install Arduino IDE, add ESP32 support, select the right board and port, upload a first sketch, verify output, then move to hardware missions such as Blink an LED with ESP32.
If you are still choosing a board, read the ESP32 DevKit component guide first. It explains USB, pins, power, and why ESP32 GPIO is 3.3 V.
Arduino IDE is the program where you write sketches. A sketch is a small C++ program with two important functions: setup(), which runs once, and loop(), which repeats.
Arduino IDE does not support ESP32 by default. You add the official Espressif board package so the IDE knows which compiler, upload tool, board menu, and ESP32 core libraries to use. After that, uploading to ESP32 feels similar to uploading to a classic Arduino board, but the voltage, pin behavior, and board selection are ESP32-specific.
Use the official Arduino download. Avoid random installer mirrors because the IDE will later download compiler tools and board support packages.
You should now see a serial port such as COM3 or COM5 on Windows, /dev/cu.usbserial-* on macOS, or /dev/ttyUSB0 on Linux. The exact name varies by computer.
https://espressif.github.io/arduino-esp32/package_esp32_index.json
If the field already has another URL, add the ESP32 URL on a new line using the list editor, or separate URLs as Arduino IDE allows. Click OK when finished.
This package includes the ESP32 Arduino core, compiler tools, libraries, and upload utility. If this step fails, check your internet connection and make sure the board manager URL was entered exactly.
Open Tools > Board > esp32. For many generic ESP32-WROOM DevKit boards, choose ESP32 Dev Module. If your exact board appears in the list, such as an ESP32-S3 or ESP32-C3 board, choose the matching entry.
| Your board | Likely Arduino IDE choice | Note |
|---|---|---|
| Generic ESP32-WROOM DevKit | ESP32 Dev Module | Good beginner default for many classic DevKit boards. |
| ESP32 DevKitC | ESP32 DevKitC or ESP32 Dev Module | Use the exact entry if available. |
| ESP32-S3 board | ESP32S3 Dev Module or exact board | Native USB options can differ from classic ESP32. |
| ESP32-C3 board | ESP32C3 Dev Module or exact board | RISC-V board family; do not use classic ESP32 settings blindly. |
| ESP32-CAM | AI Thinker ESP32-CAM or matching board | Usually needs an external USB-to-serial adapter for upload. |
On Windows, the port usually looks like COM3 or COM5. On macOS, it often starts with /dev/cu.. On Linux, it often starts with /dev/ttyUSB or /dev/ttyACM.
If no port appears, skip ahead to the troubleshooting table. Most port problems are cable or USB-driver problems, not code problems.
For the first upload, use Serial output instead of an LED. That avoids assuming your board has an onboard LED on a particular GPIO.
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println("ESP32 is running from Arduino IDE!");
}
void loop() {
Serial.println("Hello from ESP32");
delay(1000);
}
A successful upload usually ends with a message similar to Hard resetting via RTS pin. The wording can vary by board and Arduino core version.
You should now see ESP32 is running from Arduino IDE!, followed by Hello from ESP32 once per second. That proves the board package, board selection, port selection, upload process, and serial monitor are all working together.
| Line | What it means | Why it matters |
|---|---|---|
setup() | Runs once after reset. | Good place to start Serial, configure pins, and print a ready message. |
Serial.begin(115200) | Starts serial communication at 115200 baud. | Serial Monitor must use the same baud rate. |
loop() | Runs repeatedly forever. | Most beginner ESP32 behavior starts here. |
delay(1000) | Waits for 1000 milliseconds. | Slows the messages so you can read them. |
Later projects replace the Serial message with GPIO output, button input, sensor readings, OLED display updates, Wi-Fi requests, and MQTT messages.
If your board has a documented user LED, you can blink it after Serial output works. Do not assume every ESP32 board uses GPIO2. Some boards use a different GPIO, and some have no user LED.
For a reliable beginner hardware check, follow the dedicated Blink an LED with ESP32 mission. It uses an external LED, a resistor, and a clear wiring diagram, so the result does not depend on a board-specific onboard LED.
| Problem | Likely cause | Safest fix |
|---|---|---|
| ESP32 board does not appear in Boards Manager | Board manager URL missing or mistyped. | Recheck the Espressif URL in Preferences, restart Arduino IDE, then search for esp32 again. |
| No COM or serial port appears | Charge-only cable, missing driver, bad port, or unsupported USB adapter. | Try a known data cable, another USB port, and install the CP210x or CH340 driver that matches your board. |
| Upload says Failed to connect | ESP32 did not enter bootloader mode. | Hold BOOT while upload starts, release it after Arduino IDE begins connecting, and lower upload speed if needed. |
| Port busy or access denied | Serial Monitor, another IDE, or a terminal app is using the port. | Close Serial Monitor and other serial tools, unplug and reconnect the board, then upload again. |
| Sketch compiles for the wrong chip | Wrong board selected. | Select the exact ESP32 family or a safe generic entry for your DevKit, then compile again. |
| Serial Monitor shows unreadable text | Baud rate mismatch. | Set Serial Monitor to the same baud rate as Serial.begin(), usually 115200. |
| Upload worked but no Serial output appears | Board did not reset, wrong baud rate, or native USB setting differs. | Press EN/RESET, check 115200 baud, and review USB CDC settings for native USB ESP32-S3 or C3 boards. |
| Linux permission denied | User account cannot access serial devices. | Add your user to the serial or dialout group according to your distro, log out, and reconnect the board. |
Many ESP32 DevKit boards have two buttons. EN or RESET restarts the chip. BOOT can force the chip into serial bootloader mode so the upload tool can write new firmware.
Modern boards often handle this automatically. If upload fails at the connecting step, hold BOOT, click Upload, wait until Arduino IDE starts connecting, then release BOOT. You should not need BOOT after every upload once the board and cable are working reliably.
Once Serial output works, follow a build-first path. Each step uses a real existing ESP32 Engine page:
Yes. Install Arduino IDE, add the official Espressif ESP32 board package URL, install esp32 by Espressif Systems in Boards Manager, then select your ESP32 board and serial port before uploading.
Use https://espressif.github.io/arduino-esp32/package_esp32_index.json in File > Preferences > Additional boards manager URLs.
For many ESP32-WROOM DevKit boards, ESP32 Dev Module is a safe generic starting point. If your board name is printed in Arduino IDE, select the exact board entry instead.
The most common causes are a charge-only USB cable, missing CP210x or CH340 USB driver, a bad USB port, or another app already using the serial connection.
The board did not enter bootloader mode. Try a better data cable, lower upload speed, close Serial Monitor, and hold BOOT while upload starts if your board requires manual boot mode.
Match the sketch. The examples in this guide use 115200 baud, so set Serial Monitor to 115200.
No. Some DevKit boards expose an onboard LED on GPIO2, some use another pin, and some do not have a user LED. This guide starts with Serial output because it works across more boards.
Move to Blink an LED, then button input, floating pins, pull-up and pull-down resistors, analog inputs, sensors, displays, and projects.
You now have the complete ESP32 Arduino IDE path: install the IDE, add the Espressif board package, select the board and port, upload a safe first sketch, read Serial Monitor output, and diagnose the common cable, driver, BOOT button, and board-selection problems. Keep this page as your setup checklist, then move into Blink, buttons, sensors, PWM, displays, and full ESP32 projects.