esp32 camera: motion detecting security camera
Posted: Thu Jan 23, 2020 12:15 pm
Hi,
I have been working on an Arduino sketch for using the cheap ESP32 camera modules (£5 on eBay) as a security camera.
My basic idea is to have it detect movement (by the camera image alone) and when it triggers send me an email which includes a captured image.
So far I have it in a basic working state (although there is a lot of tweaking to be done yet) and thought I would post it here as it might be of interest to others and also as I am VERY far from a professional programmer I am sure people on this forum will be able to offer advice on how I can improve it etc.
At the moment it only sends an email when you load the .../test URL so you can run it without worrying about setting up the email.
You can download my latest version from here which I will keep updated: http://alanesq.com/esp32/CameraWifiMotion.zip
It is a zip file which includes the libraries I have used. It uses Wifi manager so first time you run it you will need to connect to it's wifi and enter your wifi access details - more info here: https://randomnerdtutorials.com/wifiman ... d-password
Much of the sketch is the code from other people's work which I have combined together, I believe I have links to all the sources but let me know if I have missed anyone.
It is slow to capture a frame as I have to restart the camera in a different mode first. I don't think there is any way round this as the mode required to take an image and the one for motion sensing are very different.
I have been working on an Arduino sketch for using the cheap ESP32 camera modules (£5 on eBay) as a security camera.
My basic idea is to have it detect movement (by the camera image alone) and when it triggers send me an email which includes a captured image.
So far I have it in a basic working state (although there is a lot of tweaking to be done yet) and thought I would post it here as it might be of interest to others and also as I am VERY far from a professional programmer I am sure people on this forum will be able to offer advice on how I can improve it etc.
At the moment it only sends an email when you load the .../test URL so you can run it without worrying about setting up the email.
You can download my latest version from here which I will keep updated: http://alanesq.com/esp32/CameraWifiMotion.zip
It is a zip file which includes the libraries I have used. It uses Wifi manager so first time you run it you will need to connect to it's wifi and enter your wifi access details - more info here: https://randomnerdtutorials.com/wifiman ... d-password
Much of the sketch is the code from other people's work which I have combined together, I believe I have links to all the sources but let me know if I have missed anyone.
It is slow to capture a frame as I have to restart the camera in a different mode first. I don't think there is any way round this as the mode required to take an image and the one for motion sensing are very different.