ESP32 DevKit pinout (30 pins, ESP32-WROOM-32)

Every pin of the popular 30-pin ESP32 DevKit V1, what it can do, and which ones cause trouble. Generated from the same board file BoardPilot uses to check your wiring.

ESP32 DevKit 30-pin pinout diagramESP32-WROOM-32D23VSPI_MOSID22I2C_SCLTX0 · 1U0TXDRX0 · 3U0RXDD21I2C_SDAD19VSPI_MISOD18VSPI_SCKD5VSPI_CSTX2 · 17U2TXDRX2 · 16U2RXDD4ADC2_CH0D2ADC2_CH2D15ADC2_CH3GNDGND3V33V3ENCHIP_PUVP · 36ADC1_CH0VN · 39ADC1_CH3D34ADC1_CH6D35ADC1_CH7D32ADC1_CH4D33ADC1_CH5D25ADC2_CH8D26ADC2_CH9D27ADC2_CH7D14ADC2_CH6D12ADC2_CH5D13ADC2_CH4GNDGNDVINVIN_5V
Top view, USB connector on the left. Colors: red power, grey ground, green general GPIO, yellow input-only / ADC1, orange USB serial.

Which pins are safe to use?

Good general-purpose pins

D4, D13, D14, D16 (RX2), D17 (TX2), D18, D19, D21, D22, D23, D25, D26, D27, D32, D33. D14 outputs a short PWM signal at boot.

Input only: GPIO 34, 35, 36 (VP), 39 (VN)

They can read a signal or a voltage, but cannot drive an LED or any output, and have no internal pull-up or pull-down resistors.

Strapping pins: GPIO 0, 2, 5, 12, 15

Their level at reset selects how the chip boots. GPIO 12 HIGH at reset selects 1.8 V flash and the board may not boot. GPIO 2 must be LOW or floating to upload.

Flash pins: GPIO 6 to 11

Wired to the flash memory inside the module. Never use them. The 30-pin DevKit does not break them out.

USB serial: TX0 (GPIO 1), RX0 (GPIO 3)

Used for uploading and the serial monitor. Anything connected here can break uploads.

ADC with Wi-Fi: use ADC1 (GPIO 32 to 39)

ADC2 pins (GPIO 0, 2, 4, 12 to 15, 25 to 27) stop measuring while Wi-Fi is on.

Default pins in Arduino

I2C
SDA = GPIO 21 (D21), SCL = GPIO 22 (D22). Any other output-capable pins work with Wire.begin(sda, scl).
SPI (VSPI)
MOSI = GPIO 23, MISO = GPIO 19, SCK = GPIO 18, CS = GPIO 5.
UART2
TX = GPIO 17 (TX2), RX = GPIO 16 (RX2).
DAC
GPIO 25 and GPIO 26.

All 30 pins

PinGPIOSideFunctionsNotes
EN—leftCHIP_PUReset. Pulling it LOW resets the chip (same as the EN button).
VP36leftGPIO, ADC1_CH0, SENSOR_VPInput only, no internal pull-up.
VN39leftGPIO, ADC1_CH3, SENSOR_VNInput only, no internal pull-up.
D3434leftADC1_CH6Input only, no internal pull-up.
D3535leftADC1_CH7Input only, no internal pull-up.
D3232leftGPIO, ADC1_CH4, TOUCH9, XTAL_32K_P
D3333leftGPIO, ADC1_CH5, TOUCH8, XTAL_32K_N
D2525leftGPIO, ADC2_CH8, DAC_1ADC2: not usable with Wi-Fi on.
D2626leftGPIO, ADC2_CH9, DAC_2ADC2: not usable with Wi-Fi on.
D2727leftGPIO, ADC2_CH7, TOUCH7ADC2: not usable with Wi-Fi on.
D1414leftGPIO, ADC2_CH6, TOUCH6, HSPI_SCK, MTMSOutputs a short PWM signal at boot. ADC2: not usable with Wi-Fi on.
D1212leftGPIO, ADC2_CH5, TOUCH5, HSPI_MISO, MTDIStrapping pin: HIGH at reset selects 1.8 V flash voltage, so the board may not boot. Keep it LOW or floating at reset. ADC2: not usable with Wi-Fi on.
D1313leftGPIO, ADC2_CH4, TOUCH4, HSPI_MOSI, MTCKADC2: not usable with Wi-Fi on.
GND—leftGND
VIN—leftVIN_5V5 V from USB (or a 5 V input when USB is not connected).
D2323rightGPIO, VSPI_MOSI
D2222rightGPIO, I2C_SCL (default), U0RTS
TX01rightGPIO, U0TXDUSB serial TX. Used for uploading and the serial monitor.
RX03rightGPIO, U0RXDUSB serial RX. Used for uploading and the serial monitor.
D2121rightGPIO, I2C_SDA (default)
D1919rightGPIO, VSPI_MISO, U0CTS
D1818rightGPIO, VSPI_SCK
D55rightGPIO, VSPI_CSStrapping pin (SDIO timing). Pulled up at reset. Fine to use after boot.
TX217rightGPIO, U2TXD
RX216rightGPIO, U2RXD
D44rightGPIO, ADC2_CH0, TOUCH0ADC2: not usable with Wi-Fi on.
D22rightGPIO, ADC2_CH2, TOUCH2Strapping pin: must be LOW or floating to enter download mode. Drives the blue on-board LED on most DevKit V1 boards. ADC2: not usable with Wi-Fi on.
D1515rightGPIO, ADC2_CH3, TOUCH3, HSPI_CS, MTDOStrapping pin: LOW at reset silences the boot messages. ADC2: not usable with Wi-Fi on.
GND—rightGND
3V3—right3V3Output of the on-board 3.3 V regulator (about 600 mA shared with the ESP32).

Questions

Which ESP32 pins should I avoid?

Avoid GPIO 6 to 11 (flash), be careful with the strapping pins 0, 2, 5, 12 and 15, keep TX0/RX0 free for uploads, and never use GPIO 34 to 39 as outputs.

Which ESP32 pins are input only?

GPIO 34, 35, 36 (VP) and 39 (VN). They have no internal pull-ups, so a button on these pins needs an external resistor.

What are the default I2C pins on the ESP32?

GPIO 21 is SDA and GPIO 22 is SCL. If a sensor answers only with the two swapped, the wires are crossed.

Why does my ESP32 not boot when something is connected to GPIO 12?

GPIO 12 is a strapping pin: if it is HIGH at reset, the chip selects 1.8 V for the flash and may fail to boot. Move that connection to another pin.

Which ADC pins work while Wi-Fi is on?

Only ADC1: GPIO 32, 33, 34, 35, 36 and 39. ADC2 is used by the Wi-Fi driver.

Let BoardPilot check your wiring

BoardPilot shows this board in 3D, flags risky pins as you wire, and measures the real pins to find crossed or missing wires.

Download BoardPilot

Sources: Espressif ESP32 Series Datasheet (Pin Description, Strapping Pins), ESP32 Technical Reference Manual (IO_MUX and GPIO Matrix), ESP-IDF Programming Guide (ADC).