jameszah / ESP32-CAM-Video-Recorder

Video Recorder for ESP32-CAM with http server for config and ftp (or http) server to download video
GNU General Public License v3.0
443 stars 101 forks source link

Awakening from sleep #44

Closed bogdanys closed 2 years ago

bogdanys commented 3 years ago

Hi! I would like to implement a method to wake up the ESP 32 Cam module by touching a wire. I don't have an infrared sensor, I just have ESP 32 Cam and an Arduino Uno. And I wondering if it is possible to wake up the device by using one of the free pin from the Esp 32 Cam. Thank you so much for your answer!

jameszah commented 3 years ago

You want the Uno to wake up the esp32-cam? Just wire a Uno gpio to the esp32-cam gpio where the pir was supposed to be, and enable the pir code in the esp32-cam software. Then the Uno cam start and stop the esp32-cam recording.
The esp32-cam software has capacitive touch code, which is used to disable the pir, but you could re-use it to replace the pir -- turn on the recording with one touch, and turn off the recording with the next touch. That would take some cutting and pasting in the code.

bogdanys commented 3 years ago

But at this stage when will it go into hibernation? When will the PIR sensor no longer detect movement? And that wire sensor touch what is used for? I don't understand exactly how PIR function works.

bogdanys commented 3 years ago

And I also have another issue. I implemented an if statement in loop, if recording == 0 module go into sleep mode for 1 minute. The problem is when it fall asleep the flash turn on and I dont understand why...