Background reading

ESP32 with Arduino IDE: Complete Beginner Guide

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.

18 min read · Updated 2026-09-22

Arduino IDE setup screen with ESP32 board and USB cable
Reference Guide

ESP32 with Arduino IDE: Complete Beginner Guide

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.

Explain Like I'm 12

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.

Review, Testing, and References

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.

What you will do

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.

What you need before starting

  • ESP32 development board: a common ESP32 DevKit or ESP32-WROOM board with USB.
  • USB data cable: many charging cables power the board but cannot upload code.
  • Computer: Windows, macOS, or Linux with permission to install software.
  • Arduino IDE 2.x: the current beginner-friendly Arduino editor.
  • Internet access: needed once to download the ESP32 board package.

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.

What Arduino IDE does for ESP32

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.

1. Install Arduino IDE

  1. Go to the official Arduino website and download Arduino IDE 2.x for your operating system.
  2. Install it with the default options unless your school or company has a managed installer.
  3. Open Arduino IDE once so it creates its sketchbook and settings folders.

Use the official Arduino download. Avoid random installer mirrors because the IDE will later download compiler tools and board support packages.

2. Connect your ESP32 correctly

  1. Plug the ESP32 into your computer with a known USB data cable.
  2. Watch for a power LED on the board. A power LED only confirms power, not data.
  3. Do not attach sensors, relays, motors, or breadboard wiring for the first upload. Start with the bare board.

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.

3. Add ESP32 support to Arduino IDE

  1. Open File > Preferences.
  2. Find Additional boards manager URLs.
  3. Paste this official Espressif package URL:
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.

4. Install the ESP32 board package

  1. Open Tools > Board > Boards Manager.
  2. Search for esp32.
  3. Install esp32 by Espressif Systems.
  4. Wait for the download and tool installation to finish.

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.

5. Select your ESP32 board

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 boardLikely Arduino IDE choiceNote
Generic ESP32-WROOM DevKitESP32 Dev ModuleGood beginner default for many classic DevKit boards.
ESP32 DevKitCESP32 DevKitC or ESP32 Dev ModuleUse the exact entry if available.
ESP32-S3 boardESP32S3 Dev Module or exact boardNative USB options can differ from classic ESP32.
ESP32-C3 boardESP32C3 Dev Module or exact boardRISC-V board family; do not use classic ESP32 settings blindly.
ESP32-CAMAI Thinker ESP32-CAM or matching boardUsually needs an external USB-to-serial adapter for upload.

6. Select the correct port

  1. Open Tools > Port.
  2. Unplug the ESP32 and notice which port disappears.
  3. Plug it back in and select the port that reappears.

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.

7. Upload your first ESP32 sketch

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);
  }
  1. Copy the sketch into Arduino IDE.
  2. Click Verify to compile it.
  3. Click Upload.
  4. Wait for the upload to finish and the board to reset.

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.

8. Open Serial Monitor

  1. Open Tools > Serial Monitor.
  2. Set the baud rate to 115200.
  3. Press the board's EN or RESET button if the first line does not appear.

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.

9. Understand the basic sketch

LineWhat it meansWhy 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.

Common ESP32 Arduino IDE problems

ProblemLikely causeSafest fix
ESP32 board does not appear in Boards ManagerBoard manager URL missing or mistyped.Recheck the Espressif URL in Preferences, restart Arduino IDE, then search for esp32 again.
No COM or serial port appearsCharge-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 connectESP32 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 deniedSerial 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 chipWrong board selected.Select the exact ESP32 family or a safe generic entry for your DevKit, then compile again.
Serial Monitor shows unreadable textBaud rate mismatch.Set Serial Monitor to the same baud rate as Serial.begin(), usually 115200.
Upload worked but no Serial output appearsBoard 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 deniedUser account cannot access serial devices.Add your user to the serial or dialout group according to your distro, log out, and reconnect the board.

BOOT and EN buttons explained

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.

What to learn next

Once Serial output works, follow a build-first path. Each step uses a real existing ESP32 Engine page:

  1. Understand ESP32 basics so 3.3 V GPIO and board families make sense.
  2. Blink an LED to control a GPIO output safely.
  3. Control an LED with a button to read digital input.
  4. Learn floating pins, then pull-up and pull-down resistors.
  5. Read analog inputs and understand ADC limits.
  6. Read a DHT22 temperature sensor or explore BME280 for weather data.
  7. Show values on an OLED display.
  8. Build a complete project such as the ESP32 IoT Weather Station, ESP32 Smart Thermostat, or ESP32 Line Following Robot.

Quick checklist before every upload

  • Correct board selected in Tools > Board.
  • Correct port selected in Tools > Port.
  • USB cable supports data.
  • Serial Monitor is closed during upload.
  • No external circuit is pulling BOOT strapping pins into the wrong state.
  • Serial Monitor baud rate matches the sketch after upload.

Frequently Asked Questions

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.

Conclusion

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.