Source: https://mokxi.com/learn/esp32-devkit-v1-pinout
Updated: 2026-10-26

Learn

# ESP32 DevKit V1 pinout: every pin, and which ones to avoid

Beginner

Written by the Mokxi team, updated October 26, 2026

Start building free Open the editor

Or see every lesson.

- 455 parts on the bench
- 43 boards running now
- 1.00x real time, on every board

Click to open it in the editor

A 10 k pot on D32 (ADC1 channel 4) sets the brightness of an LED on D4, with the reading printed.

This is the pinout of the 30-pin ESP32 DevKit V1, the DOIT board with an ESP32-WROOM-32 module on it that most kits ship. Every hole on its two headers is in the table below with its GPIO number, what it can do and what to watch for. After the table come the power pins, the strapping pins that decide whether the board boots at all, the input-only pins, the pins the USB and the flash take, and a list of which pin to use for what.

The circuit above is that board running in Mokxi: a potentiometer on D32, which is ADC1 channel 4, dims an LED on D4 and prints the raw reading. Mokxi models the 30-pin board, not the 38-pin DevKitC, and the numbers on this page are read from the same model the simulator runs. Where the simulator does less than the chip, the page says so on the row.

## Every pin on the header

The silkscreen calls GPIO n "Dn", so D23 is GPIO 23 and digitalWrite(23, HIGH) drives it. A few holes are named for their job instead: VP and VN are GPIO 36 and 39, TX0 and RX0 are GPIO 1 and 3, and TX2 and RX2 are GPIO 17 and 16. The table goes down the left header from EN to VIN, then down the right one from D23 to 3V3, with the USB socket at the bottom.

The order of the holes is Mokxi’s reading of the DOIT board, and clones differ in the last few. Many 30-pin boards have no D0 hole and put a second GND on the right instead, and on many the left header ends D12, D13, GND, VIN. Go by the letters printed on your board. The GPIO numbers, which are what your code uses, do not change.

Touch, the DAC and ADC2 are in the table because the chip has them and tutorials use them. Mokxi does not model any of the three, and each row says so.

ESP32 DevKit V1 (30 pins): the left header top to bottom, then the right
Pin | GPIO | What it can do | Watch out for

EN | - | Chip enable, which is the reset. Low holds the chip in reset; the EN button does that. | Not a GPIO.

VP | 36 | ADC1_CH0. Input only. | No output driver and no internal pull-up or pull-down.

VN | 39 | ADC1_CH3. Input only. | No output driver and no internal pull-up or pull-down.

D34 | 34 | ADC1_CH6. Input only. | No output driver and no internal pull-up or pull-down.

D35 | 35 | ADC1_CH7. Input only. | No output driver and no internal pull-up or pull-down.

D32 | 32 | ADC1_CH4. PWM. Touch T9 (not modeled). | A safe all-rounder.

D33 | 33 | ADC1_CH5. PWM. Touch T8 (not modeled). | A safe all-rounder.

D25 | 25 | PWM. DAC1 and ADC2_CH8 on the chip (not modeled). | ADC2 stops working while WiFi is on.

D26 | 26 | PWM. DAC2 and ADC2_CH9 on the chip (not modeled). | ADC2 stops working while WiFi is on.

D27 | 27 | PWM. ADC2_CH7 and touch T7 on the chip (not modeled). | ADC2 stops working while WiFi is on.

D14 | 14 | PWM. ADC2_CH6 and touch T6 on the chip (not modeled). | ADC2 stops working while WiFi is on.

D12 | 12 | PWM. ADC2_CH5 and touch T5 on the chip (not modeled). | Strapping pin: high at reset and the board does not boot.

GND | - | Ground. | -

D13 | 13 | PWM. ADC2_CH4 and touch T4 on the chip (not modeled). | ADC2 stops working while WiFi is on.

VIN | - | The 5 V rail from USB. Put 5 V here to run the board without a cable. | Not a GPIO.

D23 | 23 | PWM. SPI MOSI (default). | -

D22 | 22 | PWM. I2C SCL (default). | -

TX0 | 1 | UART0 TX: Serial, and the USB-to-serial chip. | Leave free, or uploads and the serial monitor break.

RX0 | 3 | UART0 RX: Serial, and the USB-to-serial chip. | Leave free, or uploads and the serial monitor break.

D21 | 21 | PWM. I2C SDA (default). | -

D19 | 19 | PWM. SPI MISO (default). | -

D18 | 18 | PWM. SPI SCK (default). | -

D5 | 5 | PWM. SPI SS (default). | Strapping pin: leave it unloaded at power-on.

TX2 | 17 | PWM. UART2 TX in core 2.x tutorials: Serial2.begin(9600, SERIAL_8N1, 16, 17). | Core 3.x puts Serial2 on 4 and 25 unless the pins are given.

RX2 | 16 | PWM. UART2 RX in core 2.x tutorials: Serial2.begin(9600, SERIAL_8N1, 16, 17). | Core 3.x puts Serial2 on 4 and 25 unless the pins are given.

D4 | 4 | PWM. ADC2_CH0 and touch T0 on the chip (not modeled). | A safe output; the examples put an LED here.

D0 | 0 | PWM. ADC2_CH1 and touch T1 on the chip (not modeled). The BOOT button. | Strapping pin: low at reset waits for an upload.

D2 | 2 | PWM. ADC2_CH2 and touch T2 on the chip (not modeled). The blue LED, lit when HIGH. | Strapping pin: must be low or floating to upload.

D15 | 15 | PWM. ADC2_CH3 and touch T3 on the chip (not modeled). | Strapping pin: low at reset silences the boot messages.

3V3 | - | The regulator’s 3.3 V output. | Not a GPIO.

## Power pins and their limits

VIN is the 5 V rail from the USB socket. Without a cable you can run the board by putting 5 V on VIN, and the regulator makes 3.3 V from it. 3V3 is that regulator’s output: it powers the ESP32 and whatever you hang on it, so a sensor is fine and a servo or a motor is not. GND is ground.

Every GPIO is 3.3 V and none is 5 V tolerant. A 5 V sensor output needs a divider or a level shifter before it reaches a pin. Espressif’s datasheet gives a pin about 40 mA when it sources current at its strongest drive setting. Treat that as a ceiling, not a target, and keep an LED to 10 to 20 mA with its resistor.

## Strapping pins: the ones that stop a board booting

Five pins are read by the chip at the instant it comes out of reset, and what they read decides how it starts: GPIO 0, 2, 5, 12 and 15. Once your sketch is running they are ordinary pins, so the trouble only shows when something wired to one holds it the wrong way at power-on.

GPIO 0 is the BOOT button. Held low at reset, the chip waits for a new program instead of running yours, so a button or a module that pulls D0 low looks like a board that never starts. GPIO 2 has to be low or floating to upload. GPIO 12 bites hardest: high at reset tells the chip its flash runs at 1.8 V, a WROOM-32’s flash needs 3.3 V, and the board will not boot until whatever holds 12 high lets go. GPIO 15 low at reset silences the boot messages on the serial port, which is harmless but confusing.

Mokxi does not model strapping. The simulated board starts whatever is on those pins, so a circuit that runs here can still refuse to boot on a desk if it pulls D12 high or D0 low. Give anything with a pull-up or a pull-down of its own one of the safe pins instead.

## Input-only pins: GPIO 34, 35, 36 and 39

GPIO 34 to 39 have an input buffer and nothing else: no output driver and no internal pull-up or pull-down. Four of them are on this header: D34, D35, VP and VN. They make good analog inputs, all on ADC1, and they cannot be outputs at all. pinMode(34, OUTPUT) does nothing on the chip, and INPUT_PULLUP does nothing either, so a button on one of them needs a 10 k resistor of its own.

Mokxi refuses an output on these pins the way the chip does, counts every attempt, and puts a small amber mark on the board, so a sketch cannot believe it is driving one.

## The onboard LED, and the BOOT and EN buttons

The blue LED is on GPIO 2 and lights when the pin is HIGH. LED_BUILTIN is 2. Because GPIO 2 is a strapping pin, whether the LED glows while the board boots varies from board to board; it settles as soon as pinMode runs. The other LED on most boards is the power light and is not on any pin.

BOOT pulls GPIO 0 low while you hold it, which is why D0 reads LOW when it is pressed. EN is the reset button. In Mokxi you can click either one on the board.

## Pins the USB and the flash use

TX0 and RX0 are UART0, wired to the board’s USB-to-serial chip, and they carry every Serial.print and every upload. Wire something to them and uploads fail or the serial monitor fills with junk, so leave them free. In Mokxi, Serial reaches the serial monitor directly, so the simulator will not show that clash; a desk will.

GPIO 6 to 11 are the SPI flash the program runs from, and they are not on this header at all, which is a good thing. The 38-pin DevKitC brings them out, as D0 to D3, CMD and CLK, and they are the pins never to use. TX2 and RX2 are where UART2 goes in most tutorials. Arduino-esp32 3.x moved Serial2’s default pins to 4 and 25, so name them: Serial2.begin(9600, SERIAL_8N1, 16, 17);. Mokxi models UART1 and UART2 bit by bit on whatever pins begin() gives them, so a GPS or a second board on 16 and 17 hears them, here as on the desk.

## Analog, PWM, I2C and SPI

Only ADC1 is safe in a project with WiFi: on a real ESP32 the radio uses ADC2, and analogRead on an ADC2 pin fails while WiFi is on. ADC1 is on six holes here: VP, VN, D32, D33, D34 and D35. Mokxi models ADC1 only, twelve bits, with a real part’s curve at the default 11 dB: a pot across 3.3 V reaches 4095 at about 3.1 V, a little before the end of its travel, and reads about 1890 in the middle.

PWM is LEDC, and any pin with an output driver can have it: analogWrite attaches a channel the first time it is called. Mokxi models the eight high-speed channels, eight bits at 1 kHz by default; the chip has sixteen in all. Wire.begin() uses D21 for SDA and D22 for SCL, and SPI uses D18, D19, D23 and D5 for SCK, MISO, MOSI and SS. In Mokxi both buses run in software on those pins, because the chip’s I2C and SPI controllers are not modeled.

## Questions

Which ESP32 pin should I use for a button?

D4, D13, D14, D18, D19, D21 to D23, D25 to D27, D32 or D33, with `INPUT_PULLUP` and the button to ground. D34, D35, VP and VN work only with a 10 k pull-up of your own, and D0, D2, D12 and D15 are strapping pins.

Which ESP32 pin should I use for an analog sensor?

An ADC1 pin: D32, D33, D34, D35, VP or VN. They keep working with WiFi on. Keep the signal under 3.3 V; the attenuator’s nominal 3.9 V full scale is a measuring range, not a safe input.

Which pins are I2C on an ESP32 DevKit V1?

SDA is D21 and SCL is D22, the pins `Wire.begin()` uses. `Wire.begin(sda, scl)` moves the bus to any other two output pins.

Which pins should I never use on an ESP32?

GPIO 6 to 11, the flash, which this board does not bring out. TX0 and RX0 if you want uploads and the serial monitor to work. And D12 for anything that is high at power-on.

Is this the 30-pin or the 38-pin pinout?

The 30-pin DOIT DevKit V1. The 38-pin Espressif DevKitC is the same chip with the same GPIO numbers in different places, a full inch between its rows, and the six flash pins brought out. It has its own board in Mokxi.

Does the ESP32 DevKit V1 have a DAC and touch pins?

The chip has two 8-bit DACs, on D25 and D26, and ten touch inputs. Mokxi models neither, so `dacWrite` and `touchRead` will not do anything useful here.

Related

## Keep going

ESP32 analogRead: 12 Bits, Attenuation and ADC2 ESP32-S3 Pinout: DevKitC-1 Pins, and Which to Avoid ESP32-C3 SuperMini Pinout: LED, ADC, I2C, Boot Pins ESP32 Projects for Beginners You Can Run Right Now XIAO ESP32-C3 Pinout: D Pins to GPIO, ADC, Boot Pins ESP32 I2C Pins: Custom Pins and Two I2C Buses ESP32 DevKitC Pinout: All 38 Pins and the Flash Six Run the ESP32 DevKit V1 in the simulator The 38-pin ESP32 DevKitC Help: the ESP32 DevKit V1 model The project page, with the full sketch Beginner

Sources

## Where the facts on this page come from

- Espressif: ESP32 Series datasheet (pins, strapping, ADC, touch, DAC, drive strength)
- Espressif: the Arduino core for the ESP32

## Build this for real

Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.

Start building free Open the editor
