arduino-libraries / ArduinoLowPower

Powersave features for SAMD boards
GNU Lesser General Public License v2.1
81 stars 57 forks source link

Is there a limitation for the sleeping mode? #11

Open pierrot10 opened 5 years ago

pierrot10 commented 5 years ago

Hello I am wondering if AdruinoLowPower can put in sleep mode my board during 1 hour? If not what's the limitation?

Actually, I make a loop which make sleep my board 5sec, wake up to quickly flash a led, sleep for 5 sec alternatively during one hour.

I would like to increase to 10 sec-

Does the ArduinoLowPower library work with Adafruit MO AMD21 with the LoRa module as well?

Thank

facchinm commented 5 years ago

Hi @pierrot10 , there should be no such limitation. sleep(uint32_t milliseconds) internally calls rtc.setAlarmEpoch , so unless this one is bugged it should allow to sleep for almost 49 days (UINT32_MAX milliseconds). If there's a problematic sketch, can you share it? The library works with all SAMD21 microcontroller based boards so it should be fine.