Smartsleep with 20ms polling Timer1 ISR
-
I'm developming a node that polls a sensor every 20ms through a Timer1 interrupt. The main loop of the program has a 1000ms wait/sleep cycle that decides whether or not to send MySensors messages depending on the sensor value.
In orde to preserve energy, I'd like to use smart sleep.My question is, will smartSleep work in together with the faster interrupt cycle ? I assume the interrupt will wake the node from smart sleep, but what happens at the end of the interrupt service routine ?
Does smartSleep resume automatically ?
Or should I call smartSleep at the end of the ISR ? Does that make sense ? Will smartSleep work properly when it is called every 20 ms ?
1 out of 1
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
PJON and Minicore not working
Development • 21 Mar 2025, 19:51 • Trand 21 Mar 2025, 19:51 -
Sending offset to node
Development • 31 Jan 2025, 00:59 • bsl88k 4 Feb 2025, 12:14 -
Saving last known good state, but not in EEPROM
Development • 30 Jan 2024, 18:46 • OldSurferDude 15 Jan 2025, 08:51 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
Adding Listen only device to my system.
Development • 26 Feb 2025, 00:39 • dpcons 26 Feb 2025, 06:26