What is ESP32: beginners guide

What Is ESP32? Pinout, Wi-Fi and a First Project for Beginners

In short: the ESP32 is a low-cost, powerful microcontroller from Espressif with Wi-Fi and Bluetooth on a single chip. It has a much faster processor and far more memory than an Arduino Uno, and it can connect to the internet directly. That is why it is used everywhere from smart home devices and RC vehicles to sensor networks and drone telemetry.

This guide explains what the ESP32 is, how it differs from Arduino, the board variants, the pin rules to watch, setting up the Arduino IDE, and a first project that controls an LED over Wi-Fi.

6 min read
In this article 11
  1. What is the ESP32?
  2. ESP32 vs Arduino Uno
  3. ESP32 variants
  4. ESP32 pins: what to watch
  5. Setting up the ESP32 in the Arduino IDE
  6. First project: control an LED over Wi-Fi
  7. Power and sleep modes
  8. What can you build with an ESP32?
  9. Common problems
  10. Frequently asked questions
  11. Related guides

What is the ESP32?

The ESP32 is actually a family of chips, not a single board. The original, most common ESP32 has:

  • Processor: dual-core Xtensa LX6, up to 240 MHz
  • Memory: 520 KB internal SRAM, usually 4 MB flash on the board
  • Wireless: 2.4 GHz Wi-Fi (802.11 b/g/n) and Bluetooth (Classic + BLE)
  • Peripherals: ADC, DAC, PWM, I2C, SPI, UART, capacitive touch pins and hardware timers
  • Operating voltage: 3.3 V

In hobby projects you usually use a development board (DevKit) with a USB-serial converter, voltage regulator and pin headers, rather than the bare chip. You plug it into a computer with a USB cable and program it from the Arduino IDE.

ESP32 vs Arduino Uno

FeatureArduino UnoESP32 DevKit
Processor8-bit, 16 MHz32-bit dual core, 240 MHz
RAM2 KB520 KB
Flash32 KBUsually 4 MB
Wi-Fi / BluetoothNoYes
Logic voltage5 V3.3 V
ADC resolution10-bit12-bit
PriceModerateUsually cheaper

The Arduino Uno is still a great choice for beginners thanks to its simplicity, 5 V compatibility and robustness. The ESP32 shines when a project needs wireless connectivity, more processing power or more memory.

ESP32 variants

Espressif offers several series in the ESP32 family:

SeriesProcessorWirelessHighlights
ESP32 (original)Dual-core LX6Wi-Fi + Bluetooth Classic + BLEMost common; most examples and libraries
ESP32-S2Single-core LX7Wi-Fi onlyNative USB, low cost
ESP32-S3Dual-core LX7Wi-Fi + BLE 5Native USB, camera and AI applications
ESP32-C3Single-core RISC-VWi-Fi + BLE 5Small, cheap, low power
ESP32-C6RISC-VWi-Fi 6 + BLE 5 + Thread/ZigbeeSmart home and Matter projects

If you are starting out, the well-documented ESP32 DevKit V1 (ESP32-WROOM-32) or an ESP32-S3 with native USB is a good choice.

ESP32 pins: what to watch

Most ESP32 pins have several functions, but some have special roles. Not knowing them leads to confusing problems such as a board that won’t boot or won’t accept uploads.

  • 3.3 V logic: ESP32 pins are not 5 V tolerant. Connecting a sensor with a 5 V signal directly can damage the chip; use a level shifter if needed.
  • GPIO 6–11: connected to the on-board flash. Don’t use them.
  • GPIO 34–39: input only, with no internal pull-up/pull-down resistors.
  • Strapping pins (GPIO 0, 2, 5, 12, 15): set how the chip starts at boot. If circuits on these pins hold the wrong level at power-up, the board may not start or accept uploads.
  • ADC2 and Wi-Fi: while Wi-Fi is on, you can’t read analog values on ADC2 pins. Use ADC1 pins (GPIO 32–39) for analog sensors.
  • Current limit: each GPIO can only supply a small current. Don’t drive motors, relay coils or many LEDs directly; use a transistor or driver board.

Pinouts vary between board makers, so check your own board’s pinout before wiring.

Setting up the ESP32 in the Arduino IDE

  • Open the Arduino IDE and go to File → Preferences.
  • In “Additional Boards Manager URLs”, add: https://espressif.github.io/arduino-esp32/package_esp32_index.json
  • Open Tools → Board → Boards Manager, search for “esp32” and install esp32 by Espressif Systems.
  • Connect your board with a USB cable. Make sure it is a data cable, not charge-only.
  • Select your board under Tools → Board (for example “ESP32 Dev Module”) and its port under Port.
  • If no port appears, install the driver for your board’s USB-serial chip (CP2102 or CH340).

On some boards you need to hold the BOOT button while “Connecting…” is shown during upload.

First project: control an LED over Wi-Fi

This project connects the ESP32 to your home network and serves a simple web page you can open from your phone or computer. Buttons on the page switch the LED on and off. On many DevKit boards the built-in LED is on GPIO 2; if yours has none, connect an LED to GPIO 2 through a 220 Ω resistor.

#include <WiFi.h>
#include <WebServer.h>

const char* ssid = "YOUR_SSID";
const char* password = "YOUR_PASSWORD";
const int LED_PIN = 2;

WebServer server(80);

void page() {
  String html = "<h1>ESP32 LED</h1>"
                "<p><a href='/on'>ON</a> | <a href='/off'>OFF</a></p>";
  server.send(200, "text/html; charset=utf-8", html);
}

void setup() {
  Serial.begin(115200);
  pinMode(LED_PIN, OUTPUT);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); }
  Serial.println();
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());

  server.on("/", page);
  server.on("/on",  []() { digitalWrite(LED_PIN, HIGH); page(); });
  server.on("/off", []() { digitalWrite(LED_PIN, LOW);  page(); });
  server.begin();
}

void loop() {
  server.handleClient();
}

After uploading, open the Serial Monitor at 115200 baud. When the board joins the network it prints its IP address. Type that address into a browser on the same network to open the control page. The ESP32 only connects to 2.4 GHz Wi-Fi; it won’t work on 5 GHz networks.

Power and sleep modes

  • USB power: development boards regulate USB’s 5 V down to 3.3 V. Fine for bench testing.
  • Battery power: current can spike to a few hundred milliamps while Wi-Fi connects. A weak supply causes the board to reset (brownout). If you use a LiPo or Li-ion cell, choose a good 3.3 V regulator or a board with a low-dropout (LDO) regulator.
  • Deep sleep: the chip drops to microamps in deep sleep, ideal for battery sensors that measure and report once an hour. But the LED and regulator on development boards raise total consumption well above the chip’s own figure.

To plan pack voltage and capacity for battery projects, use the battery pack calculator.

What can you build with an ESP32?

  • Smart home: Wi-Fi relays, temperature and humidity sensors, Home Assistant integration
  • RC and drone projects: some ExpressLRS receivers and transmitters are ESP32-based; telemetry bridges and wireless configuration interfaces
  • Data logging: stations that write sensor data to an SD card or send it to a cloud service
  • Bluetooth controllers: robots and toys controlled from a phone
  • Camera projects: simple video streaming with ESP32-CAM and ESP32-S3 boards

For an ESP32-based radio system, see the ExpressLRS guide; for the bigger picture of embedded systems in RC, read RC electronics fundamentals.

Common problems

ProblemLikely causeFix
No port appearsCharge-only cable or missing driverUse a data cable; install the CP2102/CH340 driver
“Failed to connect” errorBoard not entering upload modeHold BOOT during upload
Board keeps resettingNot enough power (brownout)Use a stronger USB port or power supply
Won’t connect to Wi-Fi5 GHz network or wrong passwordChoose a 2.4 GHz network; check SSID and password
Analog reading always 0ADC2 pin used with Wi-FiMove the sensor to an ADC1 pin (GPIO 32–39)

Frequently asked questions

Is the ESP32 compatible with Arduino code?

Mostly, yes. With the ESP32 board package installed, basic functions such as digitalWrite, analogRead and Serial work the same. Code that uses AVR-specific libraries or direct register access may not work.

Can I power the ESP32 with 5 V?

You can power the development board from USB or its 5V (VIN) pin; the on-board regulator drops it to 3.3 V. But never put 5 V signals on the GPIO pins; they work with 3.3 V logic only.

ESP32 or ESP8266?

The ESP8266 is an older single-core chip with fewer pins and no Bluetooth. Since the price difference is small, the ESP32 is usually the better choice for new projects.

Can I drive a motor with an ESP32?

Not directly from a pin. ESP32 pins only produce control signals; drive motors through a motor driver (such as an L298N or TB6612) or a MOSFET. See DC motor speed control with PWM. Servos can be controlled directly with a PWM signal but need their own power supply.

Found this useful?Share it with a friend or follow us on Instagram for new projects.

Similar Posts