MAKER PROJECTS / ESP32-CAM
Give your camera a pair of AI eyes
Start with a small ESP32-CAM, connect it to your Wi-Fi network and open its live view in a browser. Then capture a picture and ask an AI assistant to describe what it sees. This guide takes you from the workbench to your first experiment.
Contents
- Hardware
- Software and board setup
- Find your local network
- Configure and upload
- Open the camera
- Ask AI to look at a picture
- Experiment with video frames
- Troubleshooting
- Example prompt for Claude
- Downloads and next steps
- Watch the video
1. Hardware

For this project, I used an AI Thinker ESP32-CAM with an OV5640 camera and its ESP32-CAM-MB USB base board. That’s it. No external circuit, separate serial adapter or jumper wires are needed.
Fit the ESP32-CAM onto its USB base board and connect it to your computer with a USB data cable. A 2.4 GHz Wi-Fi network is required. A small tripod is optional if you want to position the camera for your experiment.

2. Software and board setup
Install Arduino IDE. In Preferences, add the Espressif board package URL:
https://espressif.github.io/arduino-esp32/package_esp32_index.jsonInstall esp32 by Espressif Systems version 4.0.0 in Boards Manager, open BTF_ESP32CAM_LiveView.ino, select AI Thinker ESP32-CAM and choose the serial port. The sketch was tested with Arduino IDE 2.x and esp32 core 4.0.0. Other core versions may not compile or may lack autofocus support. No external libraries are needed: everything ships with the esp32 core.
3. Find your local network
Connect your computer to the same network as the camera. On Windows, open Command Prompt and run:
ipconfigFind the active Wi-Fi adapter, its IPv4 address, subnet mask and default gateway. On Linux, use:
ip -4 addr
ip routeFor a typical /24 network, a router at 192.168.1.1 and a camera address ending in 200 give 192.168.1.200. Check that this address is unused and outside the DHCP allocation pool or reserved appropriately. Other subnet sizes need separate verification.
4. Configure and upload
Open config.h and fill in the three settings. Use your own network name and password. The following example uses empty credentials:
#pragma once
#define WIFI_SSID ""
#define WIFI_PASSWORD ""
#define CAMERA_IP_LAST 200
#include "config_advanced.h"Change 200 if necessary. Select Upload in Arduino IDE. Reset the board into normal boot mode and use the Serial Monitor at 115200 baud to check the camera address. Never share a configuration file or compiled firmware containing real credentials.
5. Open the camera
From a device on the same network, open the camera IP in your browser. Using the example above:
http://192.168.1.200/
http://192.168.1.200/capture
http://192.168.1.200:81/streamThe first address opens the web interface, the second requests a JPEG snapshot and the third is the MJPEG stream. Keep the camera on a trusted local network; do not expose these endpoints directly to the internet.
6. Ask AI to look at a picture
I tested capturing a JPEG from the camera and opening it with Claude Code. An assistant with local network access and image-reading capability can fetch the JPEG and inspect it. For example:
Access http://192.168.1.200/capture, save the JPEG locally, open the image and describe what you see. Report any limitations such as glare or poor focus.Alternatively, download the JPEG with a browser and upload it to an AI assistant. A cloud-only chat cannot normally reach a private local IP address. In the original experiment, the assistant inspected a 640 × 480 JPEG and noticed overexposed areas. AI interpretation can be wrong; verify important findings yourself.
7. Experiment with video frames
With FFmpeg installed, capture ten seconds of the local stream, then extract one frame per second for analysis:
ffmpeg -i http://192.168.1.200:81/stream -t 10 clip.mp4
ffmpeg -i clip.mp4 -vf fps=1 frame_%03d.jpgThese are example commands adapted to the example IP. Select frames and provide them to an image-capable assistant. This is sampled-frame analysis, not continuous autonomous monitoring.
8. Troubleshooting
| Symptom | Check |
|---|---|
| Upload fails | Serial port, USB data cable and USB base board connection. |
| Camera resets | USB power and cable connections. |
| Page unreachable | 2.4 GHz network, actual camera IP, subnet, DHCP conflicts and client isolation. |
| Image too bright or blurry | Lighting, camera position and focus. |
| AI cannot reach camera | Download the JPEG locally and upload it manually. |
9. Example prompt for Claude
Open Claude Code on a computer connected to the same local network as your ESP32-CAM. Replace the IP address in this example with your camera’s actual address.
Access my ESP32-CAM at http://192.168.1.200/capture.
Download the JPEG image and save it locally.
Open the image and describe what you can see.
Tell me if anything is difficult to identify because of lighting, reflections or focus.This is an example prompt. Claude Code needs permission to access the camera over the local network and read the downloaded image. If you use Claude in a browser without local network access, capture the JPEG yourself and attach it to the conversation.
10. Downloads and next steps
Arduino sketch, README and MIT license. v1.0, 18 KB. No passwords inside: you fill in config.h yourself.
Watch the full episode in section 11 below.
Future experiments include periodic image capture, event alerts, remote connectivity with a 4G modem and a Raspberry Pi camera. These are not features of the current Wi-Fi demonstration.
11. Watch the video
Prefer YouTube? Watch it on the Bench to Field channel.
Version history
December 2026 — Initial public documentation and source package v1.0.
Have you tried a similar experiment? What would you ask your camera to look for?