For trouble free beginner builds on a 30 pin ESP32 DevKit V1, use GPIO4, GPIO13, GPIO14, GPIO16, GPIO17, GPIO18, GPIO19, GPIO21, GPIO22, GPIO23, GPIO25, GPIO26, GPIO27, GPIO32, and GPIO33. Use GPIO34, GPIO35, GPIO36 (VP), and GPIO39 (VN) for analog or digital inputs only, and keep strapping pins (GPIO0, GPIO2, GPIO5, GPIO12, GPIO15) free until you understand boot states.
Unlike simpler microcontrollers where almost every pin behaves the same, the ESP32 packs WiFi, Bluetooth, flash memory, and boot configuration circuits onto a compact 30 pin board. Picking the wrong pin does not usually break the chip, but it causes the most frustrating beginner bugs: code refusing to upload, random boot loops, or analog readings freezing when WiFi connects.
Prefer an interactive diagram? Launch our Interactive ESP32 DevKit V1 Pinout Explorer to click any physical header pin and inspect its status immediately.
01. The Five Pin Groups You Need to Know
| Category | GPIO Numbers | Beginner Rule |
|---|---|---|
| Safe General I/O | 4, 13, 14, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 32, 33 |
Best choice for LEDs, relays, buttons, I2C, and SPI |
| Input Only + Safe ADC1 | 34, 35, 36 (VP), 39 (VN) |
Excellent for potentiometers and analog sensors; cannot drive LEDs or use INPUT_PULLUP |
| Strapping (Boot) Pins | 0, 2, 5, 12, 15 |
Checked at power on; pulling GPIO12 HIGH or GPIO2 HIGH during upload breaks boot or flashing |
| Serial / USB UART0 | 1 (TX0), 3 (RX0) |
Dedicated to USB code upload and Serial Monitor; leave unconnected |
| ADC2 WiFi Conflict Pins | 0, 2, 4, 12, 13, 14, 15, 25, 26, 27 |
Fine for digital I/O and PWM during WiFi, but analogRead() fails whenever WiFi is active |
02. Default Hardware Bus Pins
Whenever a sensor library asks for I2C, SPI, or a second UART port, wire to these default pins first so example sketches work on the first try:
- Default I2C Bus (OLED screens, BME280, RTC):
GPIO21= SDA (Data),GPIO22= SCL (Clock). - Default VSPI Bus (SD card readers, TFT screens):
GPIO23= MOSI,GPIO19= MISO,GPIO18= SCK,GPIO5= CS. - Secondary UART2 (GPS modules, CO2 sensors):
GPIO16= RX2,GPIO17= TX2. - True Analog DAC Outputs (Audio / 0V to 3.3V waveforms):
GPIO25= DAC1,GPIO26= DAC2.
03. Strapping Pin Traps Explained
Five pins act as Glossary / Strapping PinsSpecial microcontroller pins whose voltage level (HIGH or LOW) is sampled for a few milliseconds at startup to choose boot mode and flash memory voltage.:
- GPIO12 (Most Common Trap): If any external sensor or pull up resistor holds
GPIO12HIGH while the board powers up, the ESP32 switches its internal flash voltage regulator from 3.3V to 1.8V and fails to boot entirely. Never wire pull up sensors toGPIO12. - GPIO2: Connected to the onboard blue indicator LED on most DevKit V1 boards. It must remain LOW or floating when entering serial flashing mode.
- GPIO0: Wired to the onboard
BOOTbutton. Pulling it LOW at reset puts the chip into firmware upload mode. - GPIO5 and GPIO15: Output brief PWM pulses during reset before your
setup()code runs, which can momentarily click a connected relay at power up.
04. Analog Sensor Rule: Always Pick ADC1 When Using WiFi
The ESP32 has two internal analog to digital converters: ADC1 and ADC2. Because Espressif hardware shares the ADC2 circuitry with the 2.4 GHz WiFi radio, calling analogRead() on any ADC2 pin while WiFi is enabled returns an error or noisy garbage.
For any WiFi project reading soil moisture sensors, thermistors, battery voltage dividers, or potentiometers, stick exclusively to ADC1:
GPIO32andGPIO33(full I/O + ADC1)GPIO34,GPIO35,GPIO36 (VP), andGPIO39 (VN)(input only + ADC1)
Testing and Troubleshooting FAQ
Which ESP32 pins are completely safe to use first as a beginner?+
Start with GPIO4, GPIO16, GPIO17, GPIO18, GPIO19, GPIO21, GPIO22, GPIO23, GPIO25, GPIO26, GPIO27, GPIO32, and GPIO33. None of these interfere with flashing firmware or booting the board.
Why do GPIO34, GPIO35, GPIO36, and GPIO39 not blink an LED?+
Those four pins are hardware input only pins. They contain analog to digital converters and digital input buffers, but they physically lack output driver transistors and internal pull up or pull down resistors.
Why did my analog sensor stop working as soon as I turned on WiFi?+
You likely wired the sensor to an ADC2 pin (GPIO4, GPIO12, GPIO13, GPIO14, GPIO15, GPIO25, GPIO26, or GPIO27). The ESP32 WiFi radio shares internal hardware with ADC2, locking it out while WiFi runs. Move analog sensors to ADC1 pins: GPIO32, GPIO33, GPIO34, GPIO35, GPIO36 (VP), or GPIO39 (VN).

Chathura Prabashana
Chathura Prabashana builds, tests, and documents beginner friendly ESP32 circuits, microcontroller firmware, and practical electronics prototypes from scratch.
About the Author & Verification Standards →