ESP32-CAM Switch Between Still and Video Modes in MicroPython
Serve a single photo and a continuous feed from two URLs in the same MicroPython app.
Parts and sourceBefore you start
Match the AI Thinker camera target and OV2640 pin mapping to your board and check the upstream hardware and firmware requirements.
Getting started
- Start with the upstream board target, firmware versions and parts list. Verify that the camera initializes before adding the rest of the build.
- Install the linked camera driver and configure the app. Compare the default URL with the stream query parameter.
Upstream README
uPyCam - Streaming
This repository includes an application example to stream video using MicroPython on the:
Using a browser, you can connect to the boards to see the video stream.
Timelapse
The boards can be used as portable timelapse cameras. Check out this repository for more code: lemariva/uPyCam branch timelapse-camera
Firmware
The MicroPython firmware was extended to add camera support. The firmware is located in this repository: lemariva/micropython-camera-driver.
Follow these articles to get more information:
- MicroPython: Support for cameras: M5CAMERA, ESP32-CAM etc.
- MicroPython: M5CAMERA timelapse over MQTT
Note: If they are not available, they will be published in the next days.
Web-browser
You can choose between a photo or streaming mode:
- Photo mode:
http://<<board-ip>> - Streaming mode:
http://<<board-ip>>/?stream=true
Streaming mode added by Krayon. Thanks!