ESP32 DevKit V1 pinout — all 30 pins explained
What every ESP32 DevKit V1 pin can do: GPIO, ADC, input-only, strapping pins, I2C, SPI, UART, and the rules for safe wiring.
Open the course →Rules you must know
3.3 V logic
Every GPIO outputs and tolerates at most 3.3 V. A signal from a 5 V device (HC-SR04 Echo) must go through a 1 kΩ + 2 kΩ voltage divider.
Input only: 34, 35, 36, 39
No output and no internal pull-up. Ideal for analog reading (potentiometer, LDR), bad for a button without an external resistor.
ADC2 and WiFi do not mix
GPIO 0, 2, 4, 12–15, 25–27 use ADC2. When WiFi is on, analogRead() on them returns garbage. Use ADC1 (32–39).
Strapping pins: 0, 2, 5, 12, 15
They set the boot state. Do not attach anything that pulls them HIGH/LOW at power-up, especially GPIO 12.
Current per pin
Recommended ≤ 12 mA, never > 40 mA. LED with 220 Ω = 6 mA, OK. Motor, relay coil, speaker → through a transistor/module.
I2C: 21 (SDA), 22 (SCL)
Defaults, but can be changed with Wire.begin(sda, scl). Several devices on one bus — each with its own address.
PWM on any GPIO
The ESP32 has 16 LEDC channels that map to any output pin. ledcAttach(pin, freq, bits) + ledcWrite(pin, val).
UART0 (1, 3) is for USB
If you take them, you lose the Serial Monitor and uploading may fail. For a second serial device use TX2/RX2 (17, 16).
Left side
| Pin | GPIO | What it is | Where it connects / why |
|---|---|---|---|
| EN | — | Reset (active LOW) | Connect to GND for reset. The EN button does the same. Not a GPIO. |
| VP | 36 | ADC1_CH0, Input only | No pull-up/pull-down. Excellent for analog sensors. Noisy when WiFi is on without a capacitor. |
| VN | 39 | ADC1_CH3, Input only | No pull-up/pull-down. Reading only. |
| D34 | 34 | ADC1_CH6, Input only | The most common choice for a potentiometer / LDR. No internal resistors. |
| D35 | 35 | ADC1_CH7, Input only | Input only, ADC1. |
| D32 | 32 | ADC1_CH4, TOUCH9, XTAL_32K_P | Full GPIO with ADC1 — good for analog and digital. |
| D33 | 33 | ADC1_CH5, TOUCH8, XTAL_32K_N | Full GPIO with ADC1. |
| D25 | 25 | DAC1, ADC2_CH8 | True analog output (0–3.3 V, 8-bit). ADC2 does not work with WiFi. |
| D26 | 26 | DAC2, ADC2_CH9 | Second DAC output. ADC2 does not work with WiFi. |
| D27 | 27 | ADC2_CH7, TOUCH7 | Free GPIO, safe for everything. |
| D14 | 14 | ADC2_CH6, TOUCH6, HSPI_CLK | Outputs a short PWM signal at boot — not for relays. |
| D12 | 12 | ADC2_CH5, TOUCH5, HSPI_Q | STRAPPING: if HIGH at power-up, the board will not boot! Avoid it or use it only as an output. |
| D13 | 13 | ADC2_CH4, TOUCH4, HSPI_ID | Free GPIO, good for servo/PWM. |
| GND | — | Ground | Connect it to the − rail of the breadboard. |
| VIN | — | 5 V input/output | On USB there is ~5 V here for servo, HC-SR04, relay. The ESP32 can also be powered from here (5–12 V) without USB. |
Right side
| Pin | GPIO | What it is | Where it connects / why |
|---|---|---|---|
| D23 | 23 | VSPI_MOSI | SPI data to a device. Free if you do not use SPI. |
| D22 | 22 | I2C SCL (default) | Clock for OLED and I2C sensors. |
| TX0 | 1 | UART0 TX | Goes to USB → Serial Monitor. Do not use it for anything else. |
| RX0 | 3 | UART0 RX | Receives from USB. HIGH at boot. Do not use it for anything else. |
| D21 | 21 | I2C SDA (default) | Data for OLED and I2C sensors. |
| D19 | 19 | VSPI_MISO | SPI data from a device. Free if you do not use SPI. |
| D18 | 18 | VSPI_CLK | SPI clock. Free if you do not use SPI. |
| D5 | 5 | VSPI_CS, Strapping | Outputs a short PWM signal at boot — do not use it for a relay or motor. Otherwise free (SPI CS, LED, buzzer). |
| TX2 | 17 | UART2 TX | Free serial port for GPS, Bluetooth module. |
| RX2 | 16 | UART2 RX | Free serial port. |
| D4 | 4 | ADC2_CH0, TOUCH0 | Free, often used for DHT22. ADC2 does not work with WiFi. |
| D2 | 2 | Built-in LED, ADC2_CH2, TOUCH2 | The blue LED on the board. Strapping — must be LOW/floating during upload, but perfectly fine for an LED. |
| D15 | 15 | ADC2_CH3, TOUCH3, HSPI_CS | Strapping: if LOW at power-up, no boot messages. Outputs PWM at boot. |
| GND | — | Ground | Second GND pin — for the other side of the breadboard. |
| 3V3 | — | 3.3 V output | From the board regulator, ~500 mA total. For 3.3 V sensors. |