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.
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
| Pin | GPIO | Side | Functions | Notes |
|---|---|---|---|---|
| EN | — | left | CHIP_PU | Reset. Pulling it LOW resets the chip (same as the EN button). |
| VP | 36 | left | GPIO, ADC1_CH0, SENSOR_VP | Input only, no internal pull-up. |
| VN | 39 | left | GPIO, ADC1_CH3, SENSOR_VN | Input only, no internal pull-up. |
| D34 | 34 | left | ADC1_CH6 | Input only, no internal pull-up. |
| D35 | 35 | left | ADC1_CH7 | Input only, no internal pull-up. |
| D32 | 32 | left | GPIO, ADC1_CH4, TOUCH9, XTAL_32K_P | |
| D33 | 33 | left | GPIO, ADC1_CH5, TOUCH8, XTAL_32K_N | |
| D25 | 25 | left | GPIO, ADC2_CH8, DAC_1 | ADC2: not usable with Wi-Fi on. |
| D26 | 26 | left | GPIO, ADC2_CH9, DAC_2 | ADC2: not usable with Wi-Fi on. |
| D27 | 27 | left | GPIO, ADC2_CH7, TOUCH7 | ADC2: not usable with Wi-Fi on. |
| D14 | 14 | left | GPIO, ADC2_CH6, TOUCH6, HSPI_SCK, MTMS | Outputs a short PWM signal at boot. ADC2: not usable with Wi-Fi on. |
| D12 | 12 | left | GPIO, ADC2_CH5, TOUCH5, HSPI_MISO, MTDI | Strapping 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. |
| D13 | 13 | left | GPIO, ADC2_CH4, TOUCH4, HSPI_MOSI, MTCK | ADC2: not usable with Wi-Fi on. |
| GND | — | left | GND | |
| VIN | — | left | VIN_5V | 5 V from USB (or a 5 V input when USB is not connected). |
| D23 | 23 | right | GPIO, VSPI_MOSI | |
| D22 | 22 | right | GPIO, I2C_SCL (default), U0RTS | |
| TX0 | 1 | right | GPIO, U0TXD | USB serial TX. Used for uploading and the serial monitor. |
| RX0 | 3 | right | GPIO, U0RXD | USB serial RX. Used for uploading and the serial monitor. |
| D21 | 21 | right | GPIO, I2C_SDA (default) | |
| D19 | 19 | right | GPIO, VSPI_MISO, U0CTS | |
| D18 | 18 | right | GPIO, VSPI_SCK | |
| D5 | 5 | right | GPIO, VSPI_CS | Strapping pin (SDIO timing). Pulled up at reset. Fine to use after boot. |
| TX2 | 17 | right | GPIO, U2TXD | |
| RX2 | 16 | right | GPIO, U2RXD | |
| D4 | 4 | right | GPIO, ADC2_CH0, TOUCH0 | ADC2: not usable with Wi-Fi on. |
| D2 | 2 | right | GPIO, ADC2_CH2, TOUCH2 | Strapping 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. |
| D15 | 15 | right | GPIO, ADC2_CH3, TOUCH3, HSPI_CS, MTDO | Strapping pin: LOW at reset silences the boot messages. ADC2: not usable with Wi-Fi on. |
| GND | — | right | GND | |
| 3V3 | — | right | 3V3 | Output 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 BoardPilotSources: Espressif ESP32 Series Datasheet (Pin Description, Strapping Pins), ESP32 Technical Reference Manual (IO_MUX and GPIO Matrix), ESP-IDF Programming Guide (ADC).