I would like to put my openMV in sleep mode when there’s no object in its view for a while and wake it up once a new object enters the view. I, however, am not too sure what the sleep functions end up doing and which is the best way to go about it. The following are my concerns/questions:
**- I notice that there’s pyb.stop and sensor.sleep. If I only do pyb.stop, then does that leave the camera on with the ability to process images still? If so, using Frame Differencing, can I wake up the hardware from pyb.stop when an object is detected? Or, is the wakeup strictly with an external interrupt or RTC?
\
I could use a sensor to detect when an object is added in the system. If I put the camera to sleep using sensor.sleep(true) in addition to the pyb.stop, when the sensor triggers the external interrupt, will it also wake up the camera or do i need to add sensor.sleep(false) in my callback?**
Hi, the image sensor doesn’t do any image processing on its own, and the camera can’t process images while in sleep or low-power mode. The only way to wake up from sleep/low-power modes is with an interrupt (RTC, I/O, Systick etc…). The sensor.sleep() function just shuts down the sensor to save more power. I would just check once every few frames and then sleep for a while.
So generally, if I do pyb.stop, I should just do sensor.sleep(True) as well? Because if I don’t, the camera will just be on but can’t process any images. Is there an advantage in keeping the camera on while the board is on sleep?
I’ll try it with an external interrupt because waking it up every x time could cause an issue with not processing a new object as soon as it arrives.