TROUBLESHOOTING

Something not working?

Start with what you are seeing. Each chapter is a few lines and the pages that go further.

01

Manual boot

Failed to connect to ESP32: No serial data received.

The chip has to be in download mode to take an upload. It reads GPIO 0 once, at the end of every restart: low means download mode, high runs your program. Manual boot is making GPIO 0 low at that moment.

  1. Hold BOOT.
  2. Tap RESET (some boards call it EN), still holding BOOT.
  3. Release BOOT.
  4. Click Upload.

No RESET button? Hold BOOT, plug in the USB cable, then let go: powering on is a restart too. If manual boot works every time and automatic never does, the auto-reset circuit is not getting its signals, usually the cable.

02

The computer cannot find the board

No port in the Port menu, or two, or a different number each time.

Nine times in ten it is the cable: plenty of cables carry power and no data, and a board that lights up is not a board that is talking. Try another cable first, then the driver for your board's USB chip. On macOS use the cu port, not the tty one.

03

The upload worked, but I see nothing

An empty Serial Monitor, or boxes and question marks.

The Serial Monitor's baud rate has to match Serial.begin: set both to 115200. Boxes and question marks mean the two rates disagree. Silence usually means the wrong port, or a sketch that printed its greeting before you opened the monitor: press EN and watch again.

04

The board keeps resetting

It reboots when Wi-Fi starts, when a motor moves, or every few minutes.

Read the first line of the serial log. A brownout message is a power message, not a code one. The usual cause is the Wi-Fi transmit burst on a thin cable or a weak supply: use a shorter data cable and a better supply, and put 100 µF across 3.3 V close to the board. A servo or a relay never goes on the board's 3V3 pin.

05

My board will not connect to Wi-Fi

Dots forever, or it works at your desk and not at the customer's.

No ESP32 has a 5 GHz radio, so a 5 GHz-only network never appears. If the password is right and it still refuses, print the disconnect reason code instead of guessing: 15 is a bad password, 201 means the network was never found.

06

A pin does nothing, or the board will not boot

It boot-loops with a module attached, or an input never changes.

Some pins are not free: the flash pins, the input-only pins with no pull-up, and the strapping pins that are read at reset. Which numbers they are depends on the chip, and the pin article lists them per chip. On the original ESP32 the second ADC block does not work while Wi-Fi is on.

07

The sketch is too big

Sketch too big, or OTA fails with not enough space.

The app partition is what your code has to fit in, not the flash size: on a 4 MB board half goes to the second OTA slot and a chunk to the filesystem. Set Flash Size to what the board really has, and choose the partition scheme at the start of a project.