Skip to main content

Guide

ESP32 GPIO pitfalls: strapping pins, input-only pins, and the ADC2 Wi-Fi trap

The ESP32 has 34 GPIOs but you can't use them interchangeably. A practical guide to the pins that will bite you: flash pins, input-only pins, strapping pins, and why ADC2 dies with Wi-Fi on.

Jul 12, 2026 9 min readESP32PinoutGuide

The ESP32 exposes a lot of GPIOs, and beginners reasonably assume they are interchangeable. They are not. A handful of pins have special behaviour that, if ignored, produces symptoms that look like software bugs but are really pin choices. Here is the short list worth memorising. You can check any pin against the full map on the ESP32 DevKit pinout page.

The flash pins: GPIO6–11 (don't use them)

GPIO6 through GPIO11 are wired to the ESP32's integrated SPI flash chip. They are not available for your circuit — using them will crash the chip. On most DevKit boards they are not even broken out, but if you see them, leave them alone.

Input-only pins: GPIO34–39

GPIO34, 35, 36, 37, 38, and 39 are input only. They cannot drive an output — no LEDs, no relays, no chip-select lines. Just as importantly, they have no internal pull-up or pull-down resistors, so if you wire a button to one of them you must add an external pull resistor or the pin will float and read noise.

Tip: GPIO36 and GPIO39 are often silkscreened VP and VN. They are the same input-only pins — good for analog sensors, useless for outputs.

Strapping pins: GPIO0, 2, 12, 15

Strapping pins are sampled at boot to decide how the chip starts up. After boot they work as normal GPIOs, but the level they sit at during reset matters, and getting it wrong causes boot failures that look random:

  • GPIO0 selects boot mode. It must be high (or floating) to run your program; held low, the chip enters download mode. A load that pulls it low at reset will stop your board booting.
  • GPIO2 must be low or floating during boot. Fine to use, but avoid a strong external pull-up on it.
  • GPIO12 (MTDI) sets the internal flash voltage at boot. If it is pulled high at reset, the flash can be mis-powered and the board will not boot. This is the nastiest one — a pull-up here breaks everything.
  • GPIO15 (MTDO) must be high at boot for a clean start; it also controls whether boot log messages are printed.

You can still use these pins for I/O — you just have to respect their reset-time level. When in doubt, prefer a “safe” general-purpose pin instead.

The ADC2 Wi-Fi trap

This one costs people hours. The ESP32 has two ADC blocks. ADC2 cannot be used while Wi-Fi is active — the Wi-Fi driver claims it. So if your project uses Wi-Fi and you wired an analog sensor to an ADC2 pin (GPIO0, 2, 4, 12–15, 25–27), your analogRead() will return garbage or zero the moment Wi-Fi connects, with no error message.

Watch out: Rule of thumb: on any Wi-Fi project, put analog sensors on ADC1 pins — GPIO32 through GPIO39. ADC1 keeps working with the radio on.

How to avoid all of this

You can keep this table in your head, or let a tool enforce it. When you describe an ESP32 project on Banana Board, every pin assignment is validated against exactly these rules — it will not put an output on GPIO34 or an analog read on ADC2 in a Wi-Fi design. Either way, knowing why the rules exist makes you a faster debugger.

AI PCB designer

Vibe-design your PCB

Describe the board in plain English. Banana Board places the parts, routes the copper on two layers, checks it against the netlist, and hands you fab-ready Gerbers.

Start vibe PCB designing

Frequently asked

Which ESP32 pins are input only?

GPIO34, 35, 36, 37, 38, and 39 are input only and have no internal pull-up or pull-down resistors. They can read sensors and buttons (with an external pull resistor) but cannot drive outputs.

Why does my ESP32 analog read stop working with Wi-Fi on?

Because the pin is on ADC2, which the Wi-Fi driver takes over. Move the analog input to an ADC1 pin (GPIO32–39) and it will keep working while Wi-Fi is active.

What are the ESP32 strapping pins?

GPIO0, GPIO2, GPIO12, and GPIO15 (GPIO5 also straps timing on many modules). Their voltage at reset decides boot behaviour; the most common failure is a pull-up on GPIO12, which mis-sets the flash voltage and stops the board booting.

Which ESP32 pins should I avoid entirely?

GPIO6–11 are connected to the internal flash and must not be used. Be cautious with the strapping pins, and remember TX/RX (GPIO1/3) are the USB serial pins.

Build it, do not just look it up

Describe your circuit in one sentence and Banana Board wires it to these exact pins, validates it, and lays out a fab-ready PCB.

Start building free