5MP Motion Camera
1.1.1.1
A waterproof, low power, battery operated, motion activated, 5 mega-pixel, WiFi camera.
|
This project shows you how to build a WiFi camera that sleeps until activated by a microwave motion sensor. It carefully conserves power to maximize battery life. (You can expect to get a full week of use from the battery.) The camera takes great color pictures and movies in a range of sizes from 320x240px up to 2592x1944px. The camera's Adafruit Feather M0 sends the pictures to a CGI for image processing and storage. (See the JPEG Catcher project for further details.) There is no SD card in this project. The images are stored "in-your-cloud" where the CGI is hosted. This project teaches you how to move relatively large hunks of data like the camera's 8MB image buffer in small hunks like the WINC1500's 1400 byte MTU over WiFi to a server. It does this using the old-school method of base64 encoding the binary image data. This makes the data into a stream of visible characters that get piped into the CGI on standard input. The CGI decodes the data back into binary format and saves it to storage. From there a web server makes the images browsable. The camera has a wide assortment of settings that control all aspects of picture taking. The Camera Settings Project provides a mobile-responsive web page for adjusting those settings. This means you won't have to compile a new binary and load it into the Feather just to adjust the camera's exposure, brightness, or contrast, et cetera. The settings are passed from the web page to a web socket server in the form of Google flatBuffers. This is the new-school way to move relatively-small, fixed length, data structures around the web in binary format. The flatBuffers project provides libraries in many languages so that it's easy to go from JavaScript to C++ and back. This project includes both old and new school data communication methods for several reasons;
I used platformio to build this project. If you plan to do the same you'll need to create a platformio.ini file. It should look something like the one below. Replace the items in all-caps with your own configuration.
If you find a bug please create an issue. If you'd like to contribute please send a pull request.
The following were helpful references in the development of this project.