Take a picture and Publish it via WebSocket
MIT License
Take a picture and Publish it via WebSocket. This project use ESP32 Camera Driver.
ESP32 works as a WebSocket server. Use your browser as a WebSocket client.
+----------+ +----------+ +----------+
| | | |<-----Get------| |
| Camera |<---Capture--->| ESP32 | | Browser |
| | | |----Picture--->| |
+----------+ +----------+ +----------+
ESP32 development board with OV2640 camera. If you use other camera, edit sdkconfig.default. From the left:
ESP-IDF V5.0 or later. ESP-IDF V4.4 release branch reached EOL in July 2024.
For AiThinker ESP32-CAM, You have to use a USB-TTL converter.
ESP-32 | USB-TTL |
---|---|
U0TXD | RXD |
U0RXD | TXD |
GPIO0 | GND |
5V | 5V |
GND | GND |
git clone https://github.com/nopnop2002/esp-idf-websocket-camera
cd esp-idf-websocket-camera
idf.py set-target {esp32/esp32s3}
idf.py menuconfig
idf.py flash monitor
For AiThinker ESP32-CAM, Change GPIO0 to open and press the RESET button.
Set the following items using menuconfig.
You can connect using the mDNS hostname instead of the IP address.
You can use static IP.
ESP32-CAM by AI-Thinker has a flash light on GPIO4.
When you use ESP32S3-WROVER CAM, you need to set the PSRAM type.
ESP32 acts as a WebSocket server. Open index.html included in this project. Push connect server button.
Push take picture button.