deepsleep maximum time
@seb thank you for the reply.
can you please tell me why 3 byte value.
seb last edited by
Q1) The deepsleep time is set as a 3 byte value in seconds, so therefore the maximum sleep time is 2^(8*3) seconds = 16,777,216 seconds = 27.7 weeks
Q2) In regards to waking on pin
P17please see the docs here: https://docs.pycom.io/chapter/datasheets/boards/deepsleep/api.html
You can do this like so:
ds.enable_pullups('P17') ds.enable_wake_on_fall('P17') ds.enable_wake_on_fall('P17') ds.go_to_sleep(100) #Sleep for 100s
When the deep sleep shield goes to sleep, the LoPy will be completely unpowered, when it wakes up (either via a change on
P17or after 100s in the example above) the LoPy will begin code execution just as if you had pressed the reset button on the module.
I hope this answers your questions