The ESP32-WROOM-32E features 38 physical castellated pads, but only 25 general-purpose GPIOs are safely usable for arbitrary I/O once you account for strapping pins, input-only restrictions, and ADC2 WiFi conflicts. Below is the definitive bench reference for the current-production WROOM-32E module.
The Core ESP32 WROOM Pinout Reference Table
This table maps the physical GPIO numbers to their primary functions, boot-time strapping behaviors, and analog capabilities. Assumption: This applies to the standard ESP32-WROOM-32E (the current production replacement for the obsolete original WROOM-32). The logic level is strictly 3.3V; any voltage exceeding 3.6V on a GPIO will permanently damage the silicon.
| GPIO | Primary Function / Type | Boot Strapping Behavior | ADC / Touch | Bench Notes & Gotchas |
|---|---|---|---|---|
| 0 | Output / Input (Pull-up) | LOW = Flash Mode HIGH = Normal Boot |
ADC2_CH1 / T1 | Tied to the boot button on most dev boards. Must be HIGH to boot normally. |
| 2 | Output / Input | Must be LOW or Floating to boot | ADC2_CH2 / T2 | Often tied to the onboard LED. Will fail boot if pulled HIGH by an external circuit. |
| 4 | Output / Input | None | ADC2_CH0 / T0 | Safe for general I/O. Commonly used for SPI CS or I2C SDA. |
| 5 | Output / Input | Configures SDIO timing | None | Outputs PWM signal at boot. Safe for general I/O after boot completes. |
| 12 | Output / Input | Selects flash voltage (HIGH = 1.8V) | ADC2_CH5 / T5 | CRITICAL: If pulled HIGH at boot, the module will brownout and fail to start. Keep LOW or floating. |
| 13 | Output / Input | None | ADC2_CH4 / T4 | Safe for general I/O, but conflicts with WiFi if used as ADC. |
| 14 | Output / Input | None | ADC2_CH6 / T6 | Outputs PWM signal at boot. |
| 15 | Output / Input | Configures boot log output | ADC2_CH3 / T3 | Outputs debug logs at boot. Safe for I2C/SPI after boot. |
| 16 | Output / Input | None | None | Standard UART2 RX. Excellent for general I/O or secondary serial. |
| 17 | Output / Input | None | None | Standard UART2 TX. Excellent for general I/O. |
| 25 | Output / Input | None | ADC2_CH8 / DAC1 | One of two true Digital-to-Analog (DAC) output pins. |
| 26 | Output / Input | None | ADC2_CH9 / DAC2 | Second DAC pin. Safe for general I/O. |
| 27 | Output / Input | None | ADC2_CH7 / T7 | Safe for general I/O. |
| 32 | Output / Input | None | ADC1_CH4 / T9 | ADC1 channel. Safe to use while WiFi is active. |
| 33 | Output / Input | None | ADC1_CH5 / T8 | ADC1 channel. Safe to use while WiFi is active. |
| 34 | Input Only | None | ADC1_CH6 | No internal pull-up/pull-down. Requires external resistor for defined state. |
| 35 | Input Only | None | ADC1_CH7 | No internal pull-up/pull-down. Input only. |
| 36 (VP) | Input Only | None | ADC1_CH0 | Sensor_VP. Extremely high impedance input, prone to noise without shielding. |
| 39 (VN) | Input Only | None | ADC1_CH3 | Sensor_VN. Input only, no internal pull resistors. |
Note: GPIO 6 through 11 are connected to the integrated SPI flash memory. They are strictly forbidden for external use; attempting to toggle them will crash the ESP32 instantly. For the complete 38-pin physical layout, consult the official ESP32-WROOM-32E datasheet.
Rows People Get Wrong: Strapping Pins, ADC2, and Input-Only Limits
When a design fails on the bench, it is almost always due to a misunderstanding of three specific pin behaviors detailed in the ESP-IDF system documentation.
1. The Strapping Pin Trap (GPIO 0, 2, 12, 15)
Strapping pins are sampled by the internal bootloader during the first few milliseconds after reset. If you wire a sensor or relay to GPIO 12 and that sensor pulls the line HIGH during boot, the ESP32 will interpret this as a command to switch the internal flash voltage regulator to 1.8V. Since the WROOM-32E uses 3.3V flash, the chip will immediately brownout and enter a boot loop. The Fix: Never wire external devices that actively drive a signal to GPIO 0, 2, or 12. If you must use them, ensure external pull-down resistors (typically 10kΩ) are present to guarantee a LOW state at reset.
2. The ADC2 vs. WiFi Conflict
The ESP32 has two Analog-to-Digital converters. ADC1 (GPIO 32, 33, 34, 35, 36, 39) is dedicated to the main core. ADC2 (GPIO 0, 2, 4, 12, 13, 14, 15, 25, 26, 27) is shared with the WiFi radio. The moment your code executes WiFi.begin(), the WiFi stack takes exclusive control of ADC2. Any attempt to read analogRead() on an ADC2 pin will return garbage data or fail silently. The Fix: Map all analog sensors (potentiometers, LDRs, current shunts) exclusively to ADC1 pins.
3. The Input-Only Illusion (GPIO 34-39)
Beginners frequently wire an LED to GPIO 34 and wonder why it never illuminates. Pins 34 through 39 lack internal output drivers; they are physically disconnected from the output stage of the silicon. Furthermore, they lack internal pull-up and pull-down resistors. If you use GPIO 34 as a digital button input, it will float wildly and trigger false interrupts unless you add an external 10kΩ pull-up resistor to 3.3V.
The ESP32-WROOM-32E is a 3.3V device. The GPIO pins are not 5V tolerant. Connecting a 5V I2C sensor (like an older Adafruit breakout) directly to GPIO 21/22 will fry the internal ESD protection diodes and eventually destroy the pin. Always use a bidirectional logic level shifter (like the BSS138-based modules) when interfacing with 5V peripherals.
Board Variants: DevKitC V4 vs. NodeMCU-32S vs. Bare Module
Just as electrical wiring colors vary by region (NEC vs. IEC), ESP32 development board pin mappings vary wildly by the "standard" layout the manufacturer chose to clone. If you are reading a tutorial, you must know which board variant you hold.
| Feature | ESP32-DevKitC V4 (Espressif Standard) | NodeMCU-32S (Third-Party Standard) | Bare WROOM-32E Module |
|---|---|---|---|
| Pin Count | 38 pins (all broken out) | 30 or 38 pins (often drops GPIO 6-11) | 38 castellated pads |
| USB-to-UART Chip | CP2102 or CH340 (depends on batch) | CP2102 (usually) | None (requires external FTDI) |
| Pin 1 Location | Top Left (GND), near the USB port | Top Left (3V3) or Bottom Left (GND) - highly inconsistent | Bottom Left (GND), adjacent to the RF shield edge |
| Silkscreen Accuracy | Matches Espressif schematics perfectly | Frequently mislabels ADC pins or swaps I2C defaults | No silkscreen; relies on datasheet pad numbering |
| Best Use Case | Prototyping, breadboarding, reliable mapping | Budget projects, but requires manual pin verification | Custom PCB design, high-volume manufacturing |
When designing a custom PCB, always design for the bare WROOM-32E module footprint. The FCC/CE certified module saves you thousands of dollars in RF certification costs compared to designing your own trace antenna. For hardware layout rules, refer to the Espressif Hardware Design Guidelines, specifically the keep-out zones required beneath the antenna.
Safe Interpretation When Silkscreen is Faded or Missing
On the jobsite or in a messy workshop, dev board silkscreen rubs off, or you inherit a bin of unmarked bare breakout boards. Guessing pinouts by applying power and probing with an LED is a fast way to short 3.3V to GND and brick the board. Here is the systematic procedure to identify pins when markings are missing.
- Locate the Antenna / RF Shield: Orient the board so the silver RF shield and the PCB trace antenna are pointing "up" (away from you). On a bare module, Pin 1 (GND) is always the bottom-left pad, and the numbering proceeds counter-clockwise up the left side, across the top, and down the right side.
- Identify the Ground Plane: Set your multimeter to continuity mode (the diode/beep setting). Place the black probe on the large metal RF shield (which is internally grounded). Use the red probe to test the outermost pins on the headers. The pins that beep are your GND pins. On a standard DevKitC, there are usually two GND pins on the left header and one on the right.
- Find the 3.3V and 5V Rails: Switch your multimeter to DC Voltage. Power the board via USB. Place the black probe on a confirmed GND pin. Probe the remaining power-labeled pins. You will read exactly 4.8V to 5.1V on the USB/VIN pin, and a highly stable 3.28V to 3.32V on the 3V3 pin. Never probe the EN (Enable) pin with a low-impedance meter while booting, as the slight current draw can reset the chip.
- Trace the I2C Defaults: If you need the default I2C pins but the silkscreen is gone, power the board and use an oscilloscope or logic analyzer. The ESP32 Arduino core defaults to GPIO 21 (SDA) and GPIO 22 (SCL). If you upload a basic I2C scanner sketch, you will see a 100kHz or 400kHz square wave on these two pins when they are active.
By relying on physical module orientation and multimeter verification rather than faded white text, you eliminate the risk of wiring a 5V sensor into a 3.3V strapping pin, ensuring your prototype survives its first power-on.






