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.
Does ESP32 have digital pins?
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.
ESP32 Pinout
- 18 Analog-to-Digital Converter (ADC) channels
- 3 SPI interfaces
- 3 UART interfaces
- 2 I2C interfaces
- 16 PWM output channels
- 2 Digital-to-Analog Converters (DAC)
- 2 I2S interfaces
- 10 Capacitive sensing GPIOs
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.
Is ESP32 3.3 or 5V?
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.
What are GPIO in ESP32?
Input Only GPIO Pins
- GPIO 34
- GPIO 35
- GPIO 36
- GPIO 39
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:
ESP32 GPIO Pins with Internal Pull Resistors
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.
ESP32 GPIO Pins Without Internal Pull Resistors
- GPIO34
- GPIO35
- GPIO36
- GPIO39
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:
What is pinMode()?
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.
ESP32 Serial
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.
ESP32 Strapping Pins
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.
Why some ESP32 pins are default HIGH during Boot?
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.
- GPIO 1
- GPIO 3
- GPIO 5
- GPIO 6 to GPIO 11 (connected to the ESP32 integrated SPI flash memory – not recommended to use).
- GPIO 14
- GPIO 15
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.
How many I2C pins ESP32 has?
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:
- GPIO 21 (SDA)
- GPIO 22 (SCL)
You can use the wire library to use other pins for I2C, you just need to call:
What are the SPI pins of ESP32?
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:
- GPIO 6 (SCK/CLK)
- GPIO 7 (SDO/SD0)
- GPIO 8 (SDI/SD1)
- GPIO 9 (SHD/SD2)
- GPIO 10 (SWP/SD3)
- GPIO 11 (CSC/CMD)
Does ESP32 have Interrupts Pins?
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.
What is Enable pin (EN) on ESP32?
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.
ESP32 Analog to Digital Converter ADC Input Pins
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:
- ADC1_CH0 (GPIO 36)
- ADC1_CH1 (GPIO 37)
- ADC1_CH2 (GPIO 38)
- ADC1_CH3 (GPIO 39)
- ADC1_CH4 (GPIO 32)
- ADC1_CH5 (GPIO 33)
- ADC1_CH6 (GPIO 34)
- ADC1_CH7 (GPIO 35)
- ADC2_CH0 (GPIO 4)
- ADC2_CH1 (GPIO 0)
- ADC2_CH2 (GPIO 2)
- ADC2_CH3 (GPIO 15)
- ADC2_CH4 (GPIO 13)
- ADC2_CH5 (GPIO 12)
- ADC2_CH6 (GPIO 14)
- ADC2_CH7 (GPIO 27)
- ADC2_CH8 (GPIO 25)
- ADC2_CH9 (GPIO 26)
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.
ESP32 Digital-to-Analog Converter (DAC) Output Pins
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:
- DAC1 (GPIO25)
- DAC2 (GPIO26)
ESP32 Capacitive Touch Sensor Sensitive GPIOs
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.
- T0 (GPIO 4)
- T1 (GPIO 0)
- T2 (GPIO 2)
- T3 (GPIO 15)
- T4 (GPIO 13)
- T5 (GPIO 12)
- T6 (GPIO 14)
- T7 (GPIO 27)
- T8 (GPIO 33)
- T9 (GPIO 32)
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.
ESP32 RTC GPIOs
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.
- RTC_GPIO0 (GPIO36)
- RTC_GPIO3 (GPIO39)
- RTC_GPIO4 (GPIO34)
- RTC_GPIO5 (GPIO35)
- RTC_GPIO6 (GPIO25)
- RTC_GPIO7 (GPIO26)
- RTC_GPIO8 (GPIO33)
- RTC_GPIO9 (GPIO32)
- RTC_GPIO10 (GPIO4)
- RTC_GPIO11 (GPIO0)
- RTC_GPIO12 (GPIO2)
- RTC_GPIO13 (GPIO15)
- RTC_GPIO14 (GPIO13)
- RTC_GPIO15 (GPIO12)
- RTC_GPIO16 (GPIO14)
- RTC_GPIO17 (GPIO27)
ESP32 PWM pins
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.
More in Component & Platform Guides
Let’s start building.
Let’s build your idea together. All you need to do is describe what you want to make, or what problem you want to solve. Flux will work with you to make it a reality.


