deepsleep maximum time
-
@livius needful= check if temperature is really high, then send mail,notification
-
@dhk111
Ok, i assume that this notification is not critical?
Because you have not any info between wake up, that control device still is working. -
-
@dhk111 You're going to have issues with this system design. A sensor need to periodically wake up and report in so you know it is still alive. Waiting 27 weeks for it to wake up and check in???
-
@combaindeft if you use a Pytrack or Pysense you don’t necessarily need the deep sleep shield. The Pytrack and Pysense have equivalent functionality, though wake on pin is a bit more problematic.
Of course if you use one of the newer boards you don’t need either.
@seb are you sure about the 24-bit value being in seconds? On a mobile right now so I’m too lazy to check, but IIRC the value in seconds is multiplied by a calibration factor, and it’s the result which is sent on 24 bits. Don’t know the typical values of the calibration factor, but it can decrease the max time quite a bit (and you would certainly get an overflow if you tried to use 2^24-1)
It would probably be a good idea to check for overflows in the library and document a sensible max time.
While you’re in the docs, it would be helpful for many people to add details of the « external deep sleep » requirements in the
machine.deepsleepdocs. -
You are correct, upon further investigation I now see that there is a clock calibration multiplier that will multiply the value given by a value in the the range 0.75 - 1.25, so yes the longest duration of deep sleep can vary slight on a per device basis. Also, like you pointed out, this is not bounds checked so this multiplier could overflow, I will fix this in the code now.
In regards to the various deep sleeps, I agree the documentation around these features does need to be clearer. I am adding it to my to-do list
-
@jcaron We bought a set of PyTracks & LoPy's in Januari ;)
and wake on pin isn't that of a high priority for us ... we'd just like to put the device in "deepsleep mode" ... and have it wake up now-and-then ... and "check in" with some values ...
so it doesn't have to "wake up" on pin from some other external sensor ... more or less we are ok with a "deepsleep cycle loop" :)
Do you by any chance have some samples code?
-
Since you are using the LoPy, you will need the deepsleep shield to have the deepsleep to work correctly. Examples on how to use it can be found here: https://docs.pycom.io/chapter/datasheets/boards/deepsleep/api.html
-
@seb there's a Pytrack available, so no need for a deep sleep shield...
@combaindeft are you using LoRa?
Witout LoRa, the code is as simple as:
- do whatever to need to do
- setup_sleep
- go_to_sleep
With LoRa, you need to add nvram_restore and nvram_save.
-
Sorry, yes you are correct, looks like I need a stronger morning coffee! @combaindeft The Pytrack has the same functionality as the deepsleep shield built in, the example code should be very similar and can be found here: https://docs.pycom.io/chapter/pytrackpysense/apireference/sleep.html
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login