ESP32 is a dual-core SoC with two powerful Xtensa LX6 CPUs that run at up to 240 MHz. It comes with integrated Wi-Fi and Bluetooth connectivity, making it suitable for a wide range of IoT applications that require wireless connectivity. ESP32 is the successor of the popular ESP8266 chip, and it offers a lot more capabilities and functionality.
ESP32 also includes various peripherals such as SPI, I2C, UART, ADC, DAC, PWM, and GPIO, which makes it highly adaptable and suitable for a wide range of projects ranging from low-power sensor networks to the most demanding tasks, such as voice encoding, music streaming and MP3 decoding.
One of the ESP32’s major advantages is its support for low-power operation, including deep-sleep modes for battery-powered designs. Power requirements depend on whether you are using the bare chip, a module, or a development board: the ESP32 itself uses 3.3 V logic, while many DevKit boards can accept 5 V through USB or a regulated input.
Yes. The classic ESP32 chip provides 34 physical GPIOs, although a specific module or development board exposes fewer usable pins. GPIO34–GPIO39 are input-only, and GPIO6–GPIO11 are normally reserved for the integrated flash on ESP32-WROOM-32 boards. Always check the pinout for your exact board before assigning digital inputs or outputs.
NOTE: This guide focuses on the classic ESP32 used in ESP32-WROOM-32 modules and common ESP32 DevKit V1 boards. Not every chip pin is exposed on every board, and newer families such as ESP32-S2, ESP32-S3, ESP32-C3, and ESP32-C6 use different pinouts. On common ESP32-WROOM-32 boards, GPIO6–GPIO11 are connected to SPI flash and should not be used for general I/O.
The ESP32 is a 3.3V device, which means that all of its input and output pins are designed to operate with a maximum voltage of 3.3 volts. Connecting the ESP32 to a voltage source greater than 3.3 volts can damage the device, so it's important to use level shifters or voltage dividers when interfacing with higher voltage devices. Our voltage divider calculator sizes R2 for a 5V to 3.3V drop once you pick R1, and gives you the nearest standard E-series value.
The ESP32 chip and its GPIO use 3.3 V logic, and the official GPIO tolerance limit is 3.6 V. Many development boards include a regulator and can accept 5 V from USB or a 5 V/VIN pin, but that does not make the GPIO pins 5 V tolerant. Check the specifications for your exact board and use level shifting when a connected device outputs 5 V logic.
These pins don’t have internal pull-up or pull-down resistors. They can’t be used as outputs, so use these pins only as inputs:
Most digital GPIOs on the classic ESP32 can enable weak internal pull-up or pull-down resistors in software. However, GPIO34–GPIO39 do not provide internal pulls, and pins connected to flash, PSRAM, or boot-strapping functions still require extra care. Internal pulls are useful for defined logic states, but an external resistor is often preferable for noise-sensitive or safety-critical inputs.
These input-only pins do not have software-controlled pull-up or pull-down resistors. Add an external resistor when the input must not float.
To utilize these pins in Arduino IDE, and you want to make GPIO 22 as input and GPIO 23 as output:
pinMode() configures the specified pin to behave either as an input (with or without an internal weak pull-up or pull-down resistor), or an output. It is possible to enable the internal pullup resistors with the mode INPUT_PULLUP. Additionally, the INPUT mode explicitly disables the internal pullups.
The classic ESP32 includes three hardware UART controllers—UART0, UART1, and UART2—and their signals use 3.3 V logic. The GPIO matrix allows UART signals to be remapped, which is important because UART0 is commonly used for programming and logs, while UART1’s default signals overlap flash pins on many modules.
The classic ESP32 samples GPIO0, GPIO2, GPIO5, GPIO12, and GPIO15 during reset to select boot and hardware configuration options. Development boards usually manage the required states automatically, but external peripherals can still prevent boot or flashing if they drive a strapping pin to the wrong level at reset.
Some GPIOs change their state to HIGH or output PWM signals at boot or reset. This means that if you have outputs connected to these GPIOs you may get unexpected results when the ESP32 resets or boots.
NOTE: If you have peripherals connected to these pins, you may encounter issues with trying to upload new code, flashing the ESP32 with new firmware, or resetting the board, it may be because those peripherals are preventing the ESP32 from entering the right mode.
The ESP32 has two I2C channels and any pin can be set as SDA or SCL. When using the ESP32 with the Arduino IDE, the default I2C pins are:
You can use the wire library to use other pins for I2C, you just need to call:
These are the default pin mapping for SPI
GPIO 6 to GPIO 11 are exposed in some ESP32 development boards. However, these pins are connected to the integrated SPI flash on the ESP-WROOM-32 chip and are not recommended for other uses. So, don’t use these pins in your projects:
All usable ESP32 GPIO inputs can be configured to trigger interrupts. In the Arduino core, attachInterrupt() associates an input pin with an interrupt service routine and a trigger condition such as RISING, FALLING, or CHANGE. Reserved flash pins should not be repurposed, and GPIO34–GPIO39 remain input-only.
EN is the ESP32 chip-enable and reset input—not the development board regulator’s enable pin. It is normally pulled HIGH. Pulling EN LOW resets and disables the chip, which is why many boards connect it to a RESET or EN pushbutton.
The ESP32 has built-in Analog to Digital Converters (ADC) that allow it to convert analog signals into digital values that can be processed by the digital circuits on the chip. The ESP32 has a total of 18 ADC channels, which can be used to read analog signals from various sensors, such as temperature sensors, light sensors, and other types of sensors that output analog signals.
The ESP32's ADC has a resolution of 12 bits, which means that it can measure the analog signal and convert it into a digital value between 0 and 4095. The ADC can also be configured to sample the analog signal at different rates and can be programmed to read multiple channels simultaneously.
The ESP32 has 18 x 12 bits ADC input channels (while the ESP8266 only has 1x 10 bits ADC). These are the GPIOs that can be used as ADC and respective channels:
Important: ADC2 channels cannot be used normally while Wi-Fi is active because ADC2 is shared with the Wi-Fi subsystem. Also, GPIO37 and GPIO38 exist on the chip but are not exposed on common ESP32-WROOM-32 modules, so confirm the pins available on your exact board.
There are 2 x 8 bits DAC channels on the ESP32 to convert digital signals into analog voltage signal outputs. These are the DAC channels:
The ESP32 has 10 capacitive touch GPIOs. These GPIOs can sense variations in anything that holds an electrical charge, like the human skin. So they can detect variations induced when touching the GPIOs with a finger.
These pins can be easily integrated into capacitive pads, and replace mechanical buttons. Additionally, the touch pins can also be used as a wake up source when the ESP32 is in deep sleep.
To use the ESP32 touch sensor in Arduino:
Reading the touch sensor is straightforward. You use the touchRead() function, that accepts as argument, the GPIO you want to read.
This example arduino sketch reads the touch pin 0 and displays the results in the Serial Monitor.
There is RTC GPIO support on the ESP32. The GPIOs routed to the RTC low-power subsystem can be used when the ESP32 is in deep sleep. These RTC GPIOs can be used to wake up the ESP32 from deep sleep when the Ultra Low Power (ULP) co-processor is running. The following GPIOs can be used as an external wake up source.
The classic ESP32 LED Control (LEDC) peripheral provides up to 16 PWM channels. PWM is not limited to a fixed set of “PWM pins”: the GPIO matrix can route an LEDC channel to most output-capable GPIOs. Avoid GPIO34–GPIO39 because they are input-only, and avoid flash, PSRAM, or boot-sensitive pins unless your board design accounts for their other functions.
Choose the PWM frequency and duty-cycle resolution together because higher resolution reduces the maximum practical frequency. Arduino-ESP32 PWM APIs have changed between core versions, so use the LEDC functions documented for the version installed in your project rather than relying on an old fixed-pin table.

Learn about STM32 microcontrollers, popular series, USB OTG, SWD, UART, and development tools. Find the right STM32 MCU and kickstart your projects.

Looking for a comprehensive guide to ESP8266 pinout? Check out our article that covers everything you need to know about the ESP8266's pins, including digital, analog, and PWM pins. Perfect for beginners and experts alike, our guide will help you understand the ESP8266's pinout and how to use it in your projects.

The Raspberry Pi Zero 2 W is a small and powerful computer with impressive performance for its size and price. With a quad-core processor, 512MB of RAM, built-in wireless connectivity, and a USB On-The-Go port, it's suitable for many projects, including home automation, media centers, and robotics.

In this article, we will provide a comprehensive guide to the Raspberry Pi pinout diagram, including a description of each pin and its functions.

Understanding amps and volts is key to working with electronics. This guide explains their roles, relationship, and practical applications.

The blog post dives into the technical aspects of Multilayer Ceramic Capacitors (MLCCs), highlighting their importance in electronic circuits. It explains the construction of MLCCs, where layers of ceramic material and metal electrodes create a multilayered structure to store electrical energy.

The blog offers an in-depth look at Zener diodes, highlighting their crucial role in voltage regulation and stability in electronic circuits. It covers their basic principles, applications, and the challenges faced in their usage.

Compare ESP32 vs Arduino across performance, Wi-Fi, Bluetooth, memory, power consumption, and use cases. Learn the key differences to choose the right microcontroller for your next project.