The Elegoo ESP32 development board (typically the 30-pin ESP32-WROOM-32 DevKit V1 variant) operates at 3.3V logic, features 34 programmable GPIOs, and uses the official Espressif pin mapping. While the underlying silicon is identical across standard ESP32 modules, the physical silkscreen layouts and pin ordering vary by manufacturing batch and board width. Below is the direct hardware reference for the 30-pin Elegoo/DOIT-style board, followed by critical wiring constraints and standard variant comparisons.
Complete Elegoo ESP32 30-Pin Reference Table
This table maps the physical pins from top to bottom, assuming the micro-USB port is facing downward. The Espressif official datasheet dictates the internal GPIO routing, but the physical board layout determines which side the pin breaks out to.
| Side | Physical Pin | GPIO / Label | Primary Function & Constraints | 5V Tolerant? |
|---|---|---|---|---|
| Left | 1 | 3V3 | 3.3V Power Output (Max ~500mA from onboard regulator) | N/A |
| Left | 2 | GND | Common Ground | N/A |
| Left | 3 | GPIO 15 | Strapping pin. Outputs PWM at boot. Do not pull low for normal boot. | No |
| Left | 4 | GPIO 2 | Strapping pin. Connected to onboard LED. Must be LOW or floating to boot. | No |
| Left | 5 | GPIO 0 | Strapping pin. Used for flash mode. Do not use for standard I/O. | No |
| Left | 6 | GPIO 4 | General purpose I/O. Safe for standard digital/analog use. | No |
| Left | 7 | GPIO 16 | General purpose I/O. Often used for Hardware Serial (UART2 RX). | No |
| Left | 8 | GPIO 17 | General purpose I/O. Often used for Hardware Serial (UART2 TX). | No |
| Left | 9 | GPIO 5 | Strapping pin. Outputs PWM at boot. Safe for I/O post-boot. | No |
| Left | 10 | GPIO 18 | Default VSPI SCK. Recommended for SPI clock. | No |
| Left | 11 | GPIO 19 | Default VSPI MISO. Recommended for SPI data in. | No |
| Left | 12 | GPIO 21 | Default I2C SDA. Recommended for I2C data. | No |
| Left | 13 | GPIO 3 (RX0) | Default UART0 RX. Used for serial monitor debugging. | No |
| Left | 14 | GPIO 1 (TX0) | Default UART0 TX. Used for serial monitor debugging. | No |
| Left | 15 | GPIO 22 | Default I2C SCL. Recommended for I2C clock. | No |
| Right | 16 | GND | Common Ground | N/A |
| Right | 17 | GPIO 23 | Default VSPI MOSI. Recommended for SPI data out. | No |
| Right | 18 | GPIO 22 | Duplicate/Alternate routing on some 30-pin batches (verify with multimeter). | No |
| Right | 19 | GPIO 25 | General purpose I/O. Connected to internal DAC (Digital to Analog). | No |
| Right | 20 | GPIO 26 | General purpose I/O. Connected to internal DAC. | No |
| Right | 21 | GPIO 27 | General purpose I/O. Safe for standard digital/analog use. | No |
| Right | 22 | GPIO 14 | Default HSPI SCK. Alternative SPI clock pin. | No |
| Right | 23 | GPIO 12 | Strapping pin. Determines flash voltage. Keep LOW or floating for 3.3V flash. | No |
| Right | 24 | GPIO 13 | Default HSPI MOSI. Alternative SPI data out. | No |
| Right | 25 | GPIO 34 | INPUT ONLY. No internal pull-up. Requires external resistor for floating states. | No |
| Right | 26 | GPIO 35 | INPUT ONLY. No internal pull-up. | No |
| Right | 27 | GPIO 32 | General purpose I/O. Connected to internal RTC and touch sensor. | No |
| Right | 28 | GPIO 33 | General purpose I/O. Connected to internal RTC and touch sensor. | No |
| Right | 29 | GPIO 36 (VP) | INPUT ONLY. Sensor_VP. Ultra-low noise analog input. | No |
| Right | 30 | EN | Enable pin. Pull HIGH to run, LOW to reset. Do not use as standard I/O. | No |
Rows People Get Wrong: Strapping Pins and Input-Only GPIOs
The most common point of failure for makers moving from Arduino Uno to the ESP32 is assuming all GPIOs behave identically. They do not. The Espressif ESP32 Datasheet explicitly defines hardware constraints that will brick your boot sequence or result in floating, noisy sensor reads if ignored.
The Strapping Pin Trap (GPIO 0, 2, 12, 15)
During the first 100 milliseconds of power-on, the ESP32 samples specific pins to determine its boot mode. If you have a relay, sensor, or pull-up resistor attached to these pins that forces them into the wrong state, the board will halt in download mode or fail to initialize the flash memory.
- GPIO 12: Determines the flash SPI voltage. If pulled HIGH at boot, the ESP32 expects a 1.8V flash chip. Since the Elegoo board uses a 3.3V flash chip, pulling GPIO 12 HIGH will cause a brownout and a continuous boot loop. Fix: Never attach a device that drives GPIO 12 HIGH on startup.
- GPIO 0 & GPIO 2: Control SPI boot vs. Download mode. GPIO 2 is tied to the onboard blue LED. If you wire a switch to GPIO 2 that pulls it HIGH during power-on, the board will refuse to execute your code.
- GPIO 15: Controls serial debug output timing. Pulling it LOW silences the boot log, which is fine, but attaching a heavy capacitive load here can delay the boot sequence enough to trigger the watchdog timer.
The Input-Only Illusion (GPIO 34, 35, 36, 39)
If you try to use pinMode(34, OUTPUT) and write a HIGH signal, nothing will happen. These four pins are physically disconnected from the output matrix inside the silicon. Furthermore, they lack internal pull-up or pull-down resistors. If you wire a simple pushbutton to GPIO 34 without an external 10kΩ pull-down resistor, the pin will float, generating hundreds of false interrupts per second due to ambient electromagnetic noise.
Interpreting Faded Silkscreen
Elegoo and DOIT boards are manufactured in high volume, and the white silkscreen ink frequently rubs off after a few months on a breadboard. If your markings are missing, orient the board with the USB port facing down and the metal RF shield facing up. The left row always starts with 3V3 at the top left, and the right row always starts with GND at the top right. Count down the physical header holes to identify the pin; do not rely on faded paint when wiring mains-adjacent relays.
Board Variant Differences: Elegoo 30-Pin vs 38-Pin NodeMCU
While the Elegoo kit typically includes the 30-pin DevKit V1, the broader maker ecosystem frequently uses the 38-pin NodeMCU-32S. The internal WROOM-32 module is identical, but the breakout board routing differs significantly. Understanding this prevents wiring errors when following online tutorials that assume a different physical board.
| Feature | Elegoo / DOIT 30-Pin (DevKit V1) | NodeMCU-32S (38-Pin Variant) |
|---|---|---|
| Physical Width | Narrow (fits standard breadboard with 1 row of holes exposed on each side) | Wide (straddles breadboard center divider, but leaves no exposed holes for jumper wires) |
| 5V / VIN Pin | Often omitted or labeled ambiguously; relies on USB 5V rail | Clearly broken out as VIN (accepts 5V-12V to feed onboard regulator) |
| GPIO Availability | Breaks out 15 pins per side (30 total) | Breaks out 19 pins per side (38 total), including duplicate GNDs and 5V |
| I2C Default Routing | GPIO 21 (SDA) / GPIO 22 (SCL) | GPIO 21 (SDA) / GPIO 22 (SCL) - Identical logical mapping |
| Best Use Case | Prototyping on standard solderless breadboards | Custom PCBs or screw-terminal shield expansions |
When writing Arduino IDE or PlatformIO code, the logical GPIO numbers remain identical across both boards. A digitalWrite(22, HIGH) targets the exact same internal silicon register regardless of whether the physical pin is on the left side of a 30-pin board or the right side of a 38-pin board. Always code to the GPIO number, never the physical pin position.
Frequently Asked Questions
Can I power the Elegoo ESP32 with a 5V sensor directly on the GPIO pins?
No. The ESP32 GPIO pins operate at 3.3V logic and are not 5V tolerant. Connecting a 5V output from a sensor (like a standard HC-SR04 ultrasonic module) directly to an ESP32 GPIO will degrade the silicon over time and eventually destroy the pin's input buffer. You must use a voltage divider (e.g., a 1kΩ and 2kΩ resistor network) or a dedicated logic level shifter to step the 5V signal down to a safe 3.3V before it reaches the Elegoo board.
Why does my Elegoo ESP32 fail to upload code when GPIO 12 is connected?
GPIO 12 is a critical strapping pin that dictates the SPI flash voltage. If your external circuit pulls GPIO 12 HIGH during the boot sequence (which happens when the USB cable is plugged in and the board resets to enter flash mode), the ESP32 will attempt to communicate with the flash memory at 1.8V instead of 3.3V. This causes a fatal brownout, and the upload will time out. Disconnect the external circuit from GPIO 12, upload your code, and reconnect it, or redesign your circuit to ensure GPIO 12 is not pulled HIGH on startup.
How do I identify the pins if the Elegoo silkscreen is faded or missing?
If the white text is worn off, use the physical landmarks. Hold the board with the micro-USB port pointing toward your body. The metal RF shield will be facing up. The top-left pin is always 3V3, and the pin immediately below it is GND. The top-right pin is always GND, and the pin below it is GPIO 23. Count down the physical black plastic header housings sequentially. For absolute certainty, use a multimeter in continuity mode: place the black probe on the metal USB port shell (ground) and probe the header pins with the red probe to identify all GND breakouts.
Which pins are safe to use for I2C and SPI on the Elegoo board?
For I2C, the hardware defaults are GPIO 21 (SDA) and GPIO 22 (SCL). These are the most reliable pins for connecting OLEDs, BME280 sensors, and PCA9685 PWM drivers. For SPI (used for SD cards, RFID readers, and TFT displays), use the VSPI defaults: GPIO 18 (SCK), GPIO 19 (MISO), GPIO 23 (MOSI), and GPIO 5 (CS). While the ESP32's GPIO matrix allows you to map I2C and SPI to almost any pin via software, sticking to these hardware-default pins reduces CPU overhead and prevents bus contention errors in the Espressif IDF framework.






