Arduino-Pro-Mini-LoRa-Sensor-Node icon indicating copy to clipboard operation
Arduino-Pro-Mini-LoRa-Sensor-Node copied to clipboard

How is the sleep time defined and where is the wake up call

Open wlwatkins opened this issue 3 years ago • 1 comments
trafficstars

Hi,

I'm quite new at using interrupts with arduino hence i am having difficulties understanding your code. Could you enlighten me on when in the powerdown functions the sleeping time is defined? I understand it's related to LORA_TX_INTERVAL and that the number of sleep cycles is compared. But I don't understand why there a division by 8 and where the arduino is waken up

thanks

wlwatkins avatar Jun 05 '22 14:06 wlwatkins

The WDTCSR register is set to 8 seconds, therefore the micro controller wake up every 8 seconds to check if the sleep time from LORA_TX_INTERVAL has reached.

JackGruber avatar Jun 06 '22 19:06 JackGruber