How to Master the ESP32 Pinout

Think the ESP32 Pinout is straightforward? One wrong wire and your project resets nonstop. Learn what they don’t tell you in this essential ESP32 Pinout guide.

Calista maps out the ESP32 pinout the old-school way—by testing every pin that almost fried her board.

The ESP32 Pinout looks simple—until your sensor starts rebooting the board.

The first time I wired up an ESP32, I followed a pinout diagram I found online and assumed I was good to go. A few seconds later, my sensor rebooted the board. Then it did it again. And again. At first, I thought it was a power issue—but it turned out to be a tiny mistake involving a “strapping pin” I didn’t even know existed.

That’s the trap: the ESP32 Pinout looks clean and beginner-friendly, but beneath the surface are pins that behave differently at boot, pins that don’t like being pulled low, and pins that can quietly sabotage your entire project.

If you’re building with ESP32 and want your circuits to just work—without hours of debugging or fried components—this is the guide you’ve been looking for.

👉 Read on and learn how to master the ESP32 Pinout the way open hardware was meant to be: with full control and zero guesswork.

Understanding Strapping Pins (and How They Can Wreck Your Day)

Some ESP32 pins have a second job—they tell the chip how to boot. These are called strapping pins, and if you wire them to sensors, buttons, or pull them high/low at the wrong time, your board may fail to boot or act erratically.

Here’s the short list of common ESP32 strapping pins:

PinFunctionBehavior on Boot
GPIO0Boot mode selectLow = flash mode, High = normal boot
GPIO2Boot configMust be low or floating
GPIO5SPI boot modeAffects flash voltage mode
GPIO12Flash voltage selectHigh = 1.8V, Low = 3.3V (dangerous if wrong)

Tip: If your ESP32 enters bootloader mode randomly or won’t start unless you disconnect a sensor, you may be unintentionally influencing a strapping pin. Avoid using these for outputs or peripherals unless you know exactly what you’re doing.

· · ─ ·𖥸· ─ · ·

Use These GPIO Pins with Confidence

Not all ESP32 pins are created equal. Some are used by flash memory, others are strapping pins, and a few are best left untouched. Here’s a list of “safe” general-purpose GPIOs you can use for buttons, LEDs, PWM, or other peripherals:

Power Pins: Keep It Stable

  • Vin: Accepts input voltage up to 5V from USB or external sources.
  • 3V3: Regulated 3.3V output you can tap for sensors or low-power modules.
  • GND: Ground—use generously, especially when working with analog inputs or touch sensors.

⚠️ Reminder: The ESP32 is a 3.3V logic board. Feeding 5V signals into its GPIOs without proper level shifting can fry your board faster than you can say “oops.”

GPIO Pins: The Good, The Bad, and the Boot-Killers

The ESP32 offers up to 34 GPIOs, and they support digital I/O, PWM, ADC, and even capacitive touch. But not all pins are equally friendly—some are reserved, some are finicky at boot, and a few are just best avoided by beginners.

Safe GPIOs (Ideal for PWM, I/O, ADC, etc.)

Use these with confidence in most projects:
GPIO 4, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 32, 33

GPIOs to Avoid (Unless You Know What You’re Doing)

  • GPIOs 6–11: Flash memory interface. Don’t touch.
  • GPIOs 0, 2, 5, 12, 15: Strapping pins. These affect boot mode and can break your code—or your board—if miswired.
  • GPIOs 34–39: Input-only. Great for sensors, but you can’t drive an LED with these.

Special-Function GPIOs

FunctionGPIO Pins
PWMAlmost all safe GPIOs support PWM
ADCGPIO36 (VP), GPIO39 (VN), and GPIOs 32–33
UARTGPIO1 (TX), GPIO3 (RX)
SPIGPIO23 (MOSI), GPIO19 (MISO), GPIO18 (SCK)
I2CGPIO21 (SDA), GPIO22 (SCL)
TouchGPIO4 and others (e.g., GPIO13–15)
RTC InputsGPIO34–GPIO39

Pro Tip: Think in Use-Cases, Not Just Pins

Pin functions on the ESP32 are flexible thanks to its GPIO Matrix, but that doesn’t mean you should randomly assign them. Planning around boot behavior, logic levels, and power draw will save you headaches later—especially if you’re building low-power FOSS devices or educational kits for local communities.

Like what you’re reading?
Help keep DevDigest
free and caffeine-powered
—buy me a coffee on Ko-fi.

FOSS-Friendly Applications

The ESP32 stands out for its seamless integration with FOSS tools like Arduino IDE, PlatformIO, and Espressif’s ESP-IDF. These platforms provide extensive libraries and community support for tasks ranging from sensor interfacing to complex IoT protocols. For example:

  • IoT Devices: Use open-source libraries to connect sensors and actuators via I2C or SPI.
  • Wearables: Build touch-sensitive interfaces using the capacitive touch GPIOs.
  • Robotics: Control motors and servos with PWM pins supported by FOSS frameworks.

For those building larger systems, the ESP32’s compatibility with FOSS-based cloud platforms like Home Assistant or Node-RED ensures seamless integration and scalability.

Challenges and Tips

  1. GPIO Restrictions: Certain pins, like GPIO6-GPIO11, are reserved for internal flash memory operations. Always cross-check with the datasheet.
  2. Voltage Levels: As the ESP32 operates at 3.3V logic, connecting 5V signals without proper level shifting can damage the hardware.
  3. Power Management: Leverage RTC pins and deep sleep modes for energy-efficient designs.

Mastering the ESP32 Pinout: Know Your Board, Own Your Build

The ESP32 Pinout isn’t just a static chart—it’s a map full of nuances that can make or break your project. From understanding bootstrapping behavior to choosing safe GPIOs for your sensors, mastering the pinout means fewer headaches, more reliable builds, and the confidence to scale up.

As FOSS advocates, we don’t just build—we document, share, and empower others. That’s the spirit behind this guide.

If this helped save your board (and your sanity), you’ll love the kind of deep-dive, low-cost engineering guides I send out in the newsletter.

👉 Subscribe now at samgalope.dev/newsletter and get tools, tactics, and tech you can actually use.

Like what you’re reading?
Help keep DevDigest
free and caffeine-powered
—buy me a coffee on Ko-fi.

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments (

)