This project sets up an ESP32-CAM as a web server that captures and serves images via HTTP.
- Captures images from the ESP32-CAM
- Serves images via a web interface
- Supports flash control via URL parameters
.
βββ README.md
βββ lib
β βββ esp32cam-main.zip (https://github.com/yoursunny/esp32cam)
βββ src
βββ main.ino
Ensure you have the following installed:
- Arduino IDE
- ESP32 board support (Install via Arduino Board Manager)
- Required libraries (WiFi, WebServer, esp32cam)
- Open
main.ino
in Arduino IDE. - Replace the Wi-Fi credentials in the following lines:
const char *WIFI_SSID = "YOUR_WIFI_SSID"; const char *WIFI_PASS = "YOUR_WIFI_PASSWORD";
- Select AI Thinker ESP32-CAM as the board.
- Connect the ESP32-CAM and upload the code.
After uploading, check the serial monitor for the assigned IP address. Use a web browser or API tool to request images.
Endpoint | Method | Parameters | Description |
---|---|---|---|
/frame.jpg |
GET | flash=true/false |
Captures and returns an image. Default flash=false . |
http://<ESP32-CAM-IP>/frame.jpg?flash=true
- If the camera fails to initialize, check the wiring and power supply.
- If the ESP32-CAM does not connect to Wi-Fi, verify SSID and password.
- If necessary, install esp32cam in your Arduino IDE.
For a step-by-step guide on setting up the ESP32-CAM with Arduino IDE, refer to this tutorial: π ESP32-CAM Setup Guide