AI-THINKER ESP32-CAM and Other Modules:
I have four AI-THINKER ESP32-CAM boards, so the descriptions below are for that board. But I took care to leave the default definitions and controls for other boards in the example intact. You may need to adjust the programming method to suit the your board, look for examples online.
- For some other good examples and information on ESP32 based webcams I also recommend the sketches here: https://github.com/raphaelbs/esp32-cam-ai-thinker
- The AI thinker wiki can be quite informative, when run through an online translator and read sensibly: https://wiki.ai-thinker.com/esp32-cam
The basic example is extended to allow control of a high power LED FlashLamps, which are present on my modules. It can also blink a status LED to show when it connects to WiFi.
The WiFi details can be stored in an (optional) header file to allow easier code development, and a camera name for the UI title can be configured. The lamp and status LED's are optional, and the lamp uses a exponential scale for brightness so that the control has some finess.
I have left all the Face Recognition code untouched, it works, and with good lighting and camera position it can work quite well. But you can only use it in low-resolution modes, and it is not something I will be using.
The web UI has had minor changes to add the lamp control (only when enabled), I also made the 'Start Stream' and 'Snapshot' controls more prominent, and added feedback of the camera name + firmware.
- I only have AI-THINKER modules with OV2640 camera installed; so I have only been able to test with this combination. I have attempted to preserve all the code for other boards and the OV3660 module, and I have merged all changes for the WebUI etc, but I cannot guarantee operation for these.
- I created a small board with a handy switch for power, a pushbutton for the GPIO0 programming switch, and a socket for the AI-THINKER board. This proved very useful for development work and programming multiple devices.
- I found some excellent cases on Thingieverse.
- Improve Wifi, add a captive portal for setup and fallback, better disconnect/reconnect behaviour.
- The module has a SD/TF card slot; this is currently unused, but I would like to add the ability to store snapshots; recording Video at low resolution may be possible, but the card interface is too slow for HD video as far as I know.
- Remove face rcognition to save a Mb+ of code space and then implement over the air updates.
- Combine current split html pages (one per camera type) into one which adapts as needed.