Context
This ESP32-CAM meter-reading firmware was deployed from December 2024 through March 2025. It is written in C++ with PlatformIO and feeds images to an own Rails image server running in Docker.
Problem
A battery-powered camera device needs to capture meter images, make them available to a server, and limit unnecessary active time. The device therefore combines camera control, upload behavior, flash control, and sleep behavior.
Approach
- Use the OV2640 camera over I2C.
- Capture JPEG images and upload them over HTTP.
- Drive the flash with PWM.
- Use deep sleep between device activity.
- Build the firmware in C++ with PlatformIO.
- Send images to a Rails image server running in Docker.
Outcome
The deployed device captured JPEG meter images and sent them by HTTP to the Docker-hosted Rails image server. The firmware combines OV2640 camera communication, PWM flash control, and deep sleep in the stated deployment period.