Complete guide to programming the ESP32 with Arduino IDE from scratch

Last update: 30/11/2026
Author Isaac
  • Setting up the development environment using Espressif card management.
  • USB driver installation process for communication with the hardware.
  • Implementation of test codes to validate the loading of programs onto the microcontroller.
  • Technical differentiation between ESP32 board variants according to their pins and capabilities.

Programmer writing code on a laptop computer at a workbench with electronic tools

If you've just gotten your hands on an ESP32 and have no idea where to start, you've come to the right place. This little SoC is a real powerhouse in terms of performance and versatility, allowing us to experiment with WiFi and Bluetooth without any hassle. Best of all, we can master it using the Arduino environment , which is much more user-friendly for beginners.

Although the process is fairly straightforward, there are a couple of technical details that might give you a headache if you're not familiar with them. In this article, we'll break down step by step how to get your IDE ready to go, from installing the drivers until you see that first LED blinking, so you don't get lost along the way and can get the most out of your hardware.

Understanding the hardware: What exactly is the ESP32?

Close-up of hands assembling electronic components on a breadboard with wires

To avoid going in blind, it's worth knowing that the ESP32 is a system-on-a-chip (SoC) developed by Espressif Systems that stands out for its low power consumption and computing power. Unlike a conventional Arduino Uno, this device integrates built-in wireless connectivity, making it ideal for IoT projects.

It's common to find several versions on the market. For example, the standard ESP32 usually comes with 30 pins, while the ESP32-S version has 38 pins , giving us more connection options. Internally, it features a 32-bit Tensilica Xtensa CPU that can reach 240MHz, as well as a secondary processor for basic tasks in extreme power-saving mode. Its inputs and outputs operate at 3.3V DC , a vital detail to avoid damaging the chip if you try to power it with higher voltages on the GPIO pins.

  How you can Allow or Disable JavaScript In Chrome Browser

Software environment preparation

Microcontroller connected to a breadboard with an illuminated LED, ideal for illustrating the Blink project

The Arduino IDE doesn't have ESP32 support enabled by default, so we need to add the compatible "Core". First, make sure you have the latest version of the program installed from its official website. Once open, go to File and then to Preferences.

In the section where it asks for additional URLs for the board manager, you must paste the official Espressif link. Depending on the version you're looking for, you can use the stable or development index. An important tip is that if you already have other boards installed, such as the ESP8266, you must separate the URLs with a comma so that the program recognizes both sources without errors.

Installing the cards and drivers

Detailed view of an electronic printed circuit board held in a hand

With the URL configured, the next step is to go to Tools, Board, and enter the Board Manager . There, simply type "ESP32" in the search bar and select the Espressif Systems package to install it. This will download all the necessary definitions so the IDE knows how to compile for this processor.

Sometimes, the computer doesn't recognize the motherboard when connected via USB. This usually happens because the driver for the USB-Serial chip , often the CP2102, is missing. To fix this, you need to download the drivers for your operating system from the manufacturer's website, install them, and restart your computer if necessary. You'll know everything is working correctly when the Windows Device Manager displays an assigned COM port.

Uploading the first program

People working together on an electronics project with wiring and a breadboard

To verify that everything is working correctly, the best thing to do is run an electronic "Hello World" program. Connect your board and go to Tools > Board to select your model. If you're unsure which one it is, the "ESP32 Dev Module" option usually works in most cases. Don't forget to also select the correct COM port.

If you want to test the integrated LED, remember that on most of these boards it's connected to GPIO 2. Write a simple blinking code, click verify, and then upload. A crucial detail: some boards require you to hold down the BOOT button right when the IDE indicates it's uploading the code; otherwise, you might get a connection error.

  How to Adjust Brightness on PS5: Complete Step-by-Step Guide

Common troubleshooting

It's common to have doubts at first, especially when moving from simple projects to more complex ones. A classic mistake is trying to use libraries designed for Arduino Uno on the ESP32 without adapting them. For example, if you see that a DHT sensor returns the number 2147483647 on the serial monitor, there's probably a reading problem or a pin compatibility issue.

Another common mistake is in the wiring. Make sure you don't use cables that are only for charging, as you need a data cable for programming. Also, remember that the ESP32 operates at 3.3V; connecting 5V sensors directly to the input pins without a voltage divider could permanently damage the board.

Configuring the ESP32 requires following precise software steps, from managing URLs in the IDE to correctly installing USB drivers. Once the configuration phase is complete and functionality has been validated with an LED or the serial monitor, it is essential to respect the 3.3V electrical limits and use the appropriate libraries to avoid sensor reading errors.

FAQ

How do I install the ESP32 in the Arduino IDE?

You must add the Espressif URL to the Preferences menu and then search for and install the esp32 package from the Card Manager.

What should I do if my computer doesn't recognize my ESP32 board?

It is necessary to install USB-to-UART drivers, such as those for the CP2102 chip, so that the operating system assigns a COM port to the device.

What is the purpose of the BOOT button during code loading?

This button puts the board into flash mode, allowing the Arduino IDE to write the program to the chip's flash memory.

What is the difference between an ESP32 and an ESP32-S?
Why does my DHT sensor display the number 2147483647?

This value usually indicates a read error, which may be due to an incorrect connection or the use of libraries that are not compatible with the ESP32 architecture.

Can I connect 5V sensors directly to the ESP32?

It is not recommended because the ESP32's input pins operate at 3.3V and a higher voltage could cause irreversible damage to the hardware.

Which motherboard should I select if I don't know the exact model?

The ESP32 Dev Module option is the most generic and compatible with most development boards based on this SoC.

Isaac

Isaac

Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.