-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Subject of the issue
It's pretty easy to pull pin 32 low to put the OLA in Deep Sleep mode, but waking up the OLA is harder. you probably don't want to hold RST low. If you want to sample based on an environmental switch, it would be nice if there was a way to exit deep sleep without resetting.
This could be done by optionally setting a RTC wake alarm when pin 32 is pulled low. Just like when sleeping for long sampling rates, but for a longer period.
When the pin32 alarm wakes the OLA back up, if pin 32 is still low, it will go back to sleep again. Will interrupt be generated if it's low the entire time or would pin value need to be checked on startup?
Other considerations.
You'd probably want to clear the RTC alarm if the OLA wakes up early due to the RST button.
Example use case
If someone only wanted to sample when it was light out, they could hook a photo-switch up to pin 32 and have the pin32 sleep timeout set to 10 minutes. The OLA would sleep most of the night, waking every 10 minutes to see if pin 32 was still low. Come morning, it would stay awake, sampling at whatever rate desired.