CameraESP32-CAM

ESP32-CAM: live video in your browser

Difficulty: medium · Time: ~1 hour

The ESP32-CAM (AI-Thinker version) is a cheap WiFi camera, but a fussy one: there's no USB port and weak power makes it reset. This guide walks through flashing and running the built-in streaming example.

Parts

Wiring for flashing

USB-TTLESP32-CAM
5V5V
GNDGND
TXU0R (GPIO3)
RXU0T (GPIO1)
Connect IO0 to GND to enter flash mode, then press RESET.

Steps

  1. In the Arduino IDE, install the esp32 by Espressif Systems board package.
  2. Select the AI Thinker ESP32-CAM board.
  3. Open File → Examples → ESP32 → Camera → CameraWebServer.
  4. Uncomment #define CAMERA_MODEL_AI_THINKER (all other model lines must be commented). On newer core versions, pick the model in board_config.h.
  5. Enter your WiFi ssid and password (2.4GHz).
  6. Upload. When you see "Connecting...", press RESET if needed.
  7. Remove the IO0–GND jumper, press RESET, and open the Serial Monitor at 115200 to read the IP address.
  8. Open that IP in your browser and click Start Stream.

Common problems

SymptomCause / fix
Brownout detector was triggeredWeak power. Use a dedicated 5V supply with enough current, short wires, and a 470µF–1000µF capacitor near the 5V pin. Don't power it from a weak laptop USB port.
Failed to connect... Wrong boot modeIO0 wasn't tied to GND while flashing, or RESET wasn't pressed.
Camera init failed 0x105 / 0x20001Loose camera ribbon cable or the wrong board model selected.
Choppy, laggy videoLower the resolution (VGA/SVGA), raise the JPEG quality value (higher number = more compression), move closer to the router.
Chip gets very hotNormal during continuous streaming; add a small heatsink and keep it ventilated.
Security: the CameraWebServer example has no password. Use it only on your LAN and never expose its port to the Internet. For remote viewing, use a VPN (WireGuard/Tailscale) or a Cloudflare Tunnel with authentication.