ESP32 & ESP8266 Connectivity · Advanced · Vision

ESP32 Camera Stream

A live MJPEG stream from an AI Thinker ESP32-CAM, on your own network.

Firmware status: Generated from this project's own pin map and compiled with arduino-cli for esp32:esp32:esp32cam before publication; bench validation on your hardware is still required.

Board: AI Thinker ESP32-CAM · ESP32-S @ 240 MHz with OV2640 camera · 3.3 V logic · build for esp32:esp32:esp32cam.

What you will build

A board-specific camera build streaming MJPEG at a resolution the module can actually sustain.

Components

  • AI Thinker ESP32-CAM module
  • USB-to-serial adapter (the module has no USB socket)
  • 5 V supply that can deliver 500 mA cleanly
  • FTDI jumper leads

Pin map for this build

Sketch constantPinWhat it is

Tools

  • USB programming cable
  • Multimeter
  • Current-limited bench supply (for anything that switches a load)
  • Small screwdriver and wire cutters

Build sequence

  1. Connect the adapter with GPIO0 tied to ground so the module enters flash mode.
  2. Select AI Thinker ESP32-CAM in the IDE, flash, then remove the GPIO0 link and reset.
  3. Open the printed stream address; the first frame can take a second or two.
  4. If frames stall, drop to QVGA and reduce the JPEG quality before suspecting the network.

Test and expected result

A live stream appears in a browser, frame count climbs in the serial log, and the stream recovers on its own if the viewer disconnects.

Acceptance checks

stream opens, frames advance, recovers after the viewer leaves

Safety and limits

The module's pins are 3.3 V and its camera ribbon is fragile. Power from a supply that can deliver the peak current, or the board resets mid-frame.

Hardware scope

Board-specific camera pins, MJPEG over HTTP on port 81, PSRAM-aware frame settings.

Connection diagram

Connection diagram for ESP32 Camera Stream

Download the connection diagram (SVG)

Download the Arduino sketch (E08_esp32_camera_stream.ino)

Guide source: the sketch on this page was generated from the pin map above and compiled for esp32:esp32:esp32cam before publication.

Related projects

Back to all project guides · Study the course