The ESP32-WROOM-32 (and its current RF-optimized ESP32-WROOM-32E variant) is the workhorse of IoT prototyping. However, its 38-pin layout hides critical hardware constraints that routinely brick boot sequences and break sensor readings. Below is the definitive pinout reference, prioritizing the bare module standard before addressing vendor-specific dev board mappings.

The Complete ESP32-WROOM-32 Pinout Reference

The following table maps the physical pins of the bare ESP32-WROOM-32E module to their primary GPIO assignments, default boot states, and hard hardware constraints. This data is sourced directly from the Espressif Hardware Design Guidelines.

Module Pin GPIO Primary Function Boot / Strapping Rule Hardware Constraints & Notes
8 GPIO 0 Boot Select, ADC2 Must be HIGH for normal boot Pulled LOW to enter UART bootloader. Shared with ADC2 (no WiFi).
9 GPIO 2 Boot Select, ADC2 Must be LOW or floating Often tied to onboard LED on DevKits. Cannot be HIGH at boot.
10 GPIO 4 ADC2, Touch0 No strapping requirement Safe for general I/O. Unusable for analog reads while WiFi is active.
13 GPIO 12 (MTDI) Flash Voltage, ADC2 MUST BE LOW for 3.3V flash DANGER: If pulled HIGH at boot, flash VDD drops to 1.8V, causing brownout.
16 GPIO 15 Boot Select, ADC2 Must be HIGH for normal boot Controls boot log printing. Internal pull-up enabled by default.
23 GPIO 16 UART2 RX No strapping requirement No ADC or Touch capability. Excellent for hardware UART RX.
24 GPIO 17 UART2 TX No strapping requirement No ADC or Touch capability. Excellent for hardware UART TX.
32 GPIO 25 DAC1, ADC2 No strapping requirement One of two true Digital-to-Analog pins. Unusable with WiFi.
36 GPIO 32 ADC1, Touch9, XTAL No strapping requirement Safe for analog reads during WiFi operation. Shares package with 32kHz XTAL.
37 GPIO 33 ADC1, Touch8, XTAL No strapping requirement Safe for analog reads during WiFi operation.
6-11, 38 GPIO 34-39 ADC1, Input ONLY No strapping requirement Hardware limit: No internal pull-up/pull-down resistors. No output drive.
5V Tolerance Warning: The ESP32-WROOM-32 is a strict 3.3V logic device. Feeding 5V into any GPIO pin (including those labeled 'VIN' or '5V' on dev boards, which route to the onboard LDO, not the SoC) will permanently destroy the silicon. Use a logic level shifter or a resistor voltage divider for 5V sensors.

Board Variants and Tracing Faded Markings

In embedded hardware, 'regional standards' translate to vendor-specific breakout boards. The bare Espressif module follows one physical layout, but the silkscreens on popular development boards rearrange these pins entirely. Knowing which standard applies to your physical board is critical.

The Three Pinout Standards

  • The Bare Module (Espressif Standard): 38 pins total (19 per side, minus the bottom thermal pad). Pin 1 is top-left when the antenna points UP. This is the source of truth for custom PCB design.
  • 30-Pin DevKitC V4 (DOIT / Generic): Omits GPIO 6-11 (which are tied to the internal SPI flash) and GPIO 20. It breaks out 15 pins per side. The silkscreen reads sequentially from the USB port, but the physical GPIO mapping jumps around (e.g., the pin labeled 'D2' is actually GPIO 2, but 'D4' is GPIO 4).
  • 38-Pin NodeMCU-32S (Ai-Thinker): Breaks out almost all module pins but uses a wider breadboard-incompatible footprint. The silkscreen labels often use 'VP' (GPIO 36) and 'VN' (GPIO 39) instead of ADC numbers.

Safe Interpretation When Markings Are Faded or Missing

If you inherit a damaged dev board or a custom PCB where the silkscreen has been burned off by flux or heat, do not guess. Use a digital multimeter (DMM) and the physical anchors of the WROOM module to map the pins safely:

  1. Establish Physical Orientation: Locate the metal RF shield can and the PCB antenna. With the antenna pointing away from you, Pin 1 of the bare module is the top-left pad.
  2. Find Ground (Continuity Mode): Set your DMM to continuity. Probe the outer metal shield of the USB micro-B/Type-C connector—this is always tied to system GND. Now probe the module pads. On the bare module, Pins 1, 15, and 38 are GND.
  3. Verify 3V3 and EN: Power the board via USB. Set the DMM to DC Voltage. Probe the black GND reference with your left hand, and use the right hand to probe for 3.3V. Pin 2 and Pin 3 on the bare module are 3V3. Pin 8 is EN (Enable), which should read ~3.2V when the chip is running.
  4. Identify Strapping Pins: If the board fails to boot, check GPIO 12 (Pin 13 on the module). If your external circuit is pulling this pin HIGH via a sensor or relay, the ESP32 will brownout endlessly.

The 'Gotcha' Pins: Strapping, ADC2, and WiFi Conflicts

The most common support tickets in the ESP-IDF GPIO documentation stem from developers treating the ESP32 like an Arduino Uno, assuming every pin is a general-purpose I/O. The ESP32 SoC routes multiple internal peripherals to the same physical pads, creating hard conflicts.

Rows People Get Wrong: The ADC2 vs. WiFi Trap

If your project requires reading analog sensors (like an LDR or NTC thermistor) while connected to WiFi or Bluetooth, you cannot use ADC2.

ADC2 channels (GPIO 0, 2, 4, 12, 13, 14, 15, 25, 26, 27) share the internal SAR ADC bus with the WiFi MAC layer. When the WiFi radio initializes, it takes exclusive control of ADC2. If your code calls adc2_get_raw() while WiFi is active, the function will silently fail and return ESP_ERR_INVALID_STATE.

The Fix: Route all analog sensors that must operate during network transmission to ADC1 (GPIO 32, 33, 34, 35, 36, 39). ADC1 is dedicated solely to the RTC domain and does not conflict with the radio.

Rows People Get Wrong: The GPIO 12 Brownout

GPIO 12 (MTDI) is a boot strapping pin that dictates the voltage regulator output for the external SPI flash chip.

  • If GPIO 12 is LOW (or floating, due to internal weak pull-downs) at boot, the regulator outputs 3.3V. This is correct for 99% of WROOM modules.
  • If GPIO 12 is HIGH at boot, the regulator outputs 1.8V.

If you wire a relay, a pull-up resistor, or an active-high sensor to GPIO 12, and that signal happens to be HIGH when you press the reset button, the flash chip receives 1.8V instead of 3.3V. The chip will fail to read its own firmware, and the serial monitor will spit out a continuous loop of rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) errors. Always design external circuits to ensure GPIO 12 is pulled LOW or left floating during the first 500ms of power-on.

Input-Only Pins (GPIO 34-39)

Developers frequently attempt to use GPIO 34 through 39 to drive LEDs or trigger MOSFETs, only to find the pins output exactly 0V. These six pins are physically hardwired as input-only inside the silicon. Furthermore, they lack internal pull-up and pull-down resistors. If you use GPIO 34 for a push-button, you must provide an external 10kΩ pull-down or pull-up resistor on your breadboard or PCB, otherwise the pin will float and generate phantom interrupts.