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 constant | Pin | What it is |
|---|
Tools
- USB programming cable
- Multimeter
- Current-limited bench supply (for anything that switches a load)
- Small screwdriver and wire cutters
Build sequence
- Connect the adapter with GPIO0 tied to ground so the module enters flash mode.
- Select AI Thinker ESP32-CAM in the IDE, flash, then remove the GPIO0 link and reset.
- Open the printed stream address; the first frame can take a second or two.
- 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
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
- ESP32 Captive Portal Wi-Fi Manager — Boot the ESP32 with no credentials and configure its network from a phone, with the portal saved to flash.
- ESP8266 Config Portal — The same idea on the cheapest board that can do it: an ESP8266 that configures itself from a browser.
- ESP8266 Sensor Portal Logger — A battery-minded sensor node you configure in the field, with the reading shown on its own setup page.