PinLab › Pinout

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

PinGPIOWhat it isWhere it connects / why
EN—Reset (active LOW)Connect to GND for reset. The EN button does the same. Not a GPIO.
VP36ADC1_CH0, Input onlyNo pull-up/pull-down. Excellent for analog sensors. Noisy when WiFi is on without a capacitor.
VN39ADC1_CH3, Input onlyNo pull-up/pull-down. Reading only.
D3434ADC1_CH6, Input onlyThe most common choice for a potentiometer / LDR. No internal resistors.
D3535ADC1_CH7, Input onlyInput only, ADC1.
D3232ADC1_CH4, TOUCH9, XTAL_32K_PFull GPIO with ADC1 — good for analog and digital.
D3333ADC1_CH5, TOUCH8, XTAL_32K_NFull GPIO with ADC1.
D2525DAC1, ADC2_CH8True analog output (0–3.3 V, 8-bit). ADC2 does not work with WiFi.
D2626DAC2, ADC2_CH9Second DAC output. ADC2 does not work with WiFi.
D2727ADC2_CH7, TOUCH7Free GPIO, safe for everything.
D1414ADC2_CH6, TOUCH6, HSPI_CLKOutputs a short PWM signal at boot — not for relays.
D1212ADC2_CH5, TOUCH5, HSPI_QSTRAPPING: if HIGH at power-up, the board will not boot! Avoid it or use it only as an output.
D1313ADC2_CH4, TOUCH4, HSPI_IDFree GPIO, good for servo/PWM.
GND—GroundConnect it to the − rail of the breadboard.
VIN—5 V input/outputOn 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

PinGPIOWhat it isWhere it connects / why
D2323VSPI_MOSISPI data to a device. Free if you do not use SPI.
D2222I2C SCL (default)Clock for OLED and I2C sensors.
TX01UART0 TXGoes to USB → Serial Monitor. Do not use it for anything else.
RX03UART0 RXReceives from USB. HIGH at boot. Do not use it for anything else.
D2121I2C SDA (default)Data for OLED and I2C sensors.
D1919VSPI_MISOSPI data from a device. Free if you do not use SPI.
D1818VSPI_CLKSPI clock. Free if you do not use SPI.
D55VSPI_CS, StrappingOutputs a short PWM signal at boot — do not use it for a relay or motor. Otherwise free (SPI CS, LED, buzzer).
TX217UART2 TXFree serial port for GPS, Bluetooth module.
RX216UART2 RXFree serial port.
D44ADC2_CH0, TOUCH0Free, often used for DHT22. ADC2 does not work with WiFi.
D22Built-in LED, ADC2_CH2, TOUCH2The blue LED on the board. Strapping — must be LOW/floating during upload, but perfectly fine for an LED.
D1515ADC2_CH3, TOUCH3, HSPI_CSStrapping: if LOW at power-up, no boot messages. Outputs PWM at boot.
GND—GroundSecond GND pin — for the other side of the breadboard.
3V3—3.3 V outputFrom the board regulator, ~500 mA total. For 3.3 V sensors.