TheThingsNetwork / arduino-device-lib

Arduino Library for TTN Devices
MIT License
207 stars 96 forks source link

Sleep LoRa module between use #115

Closed FokkeZB closed 7 years ago

amkuipers commented 7 years ago

For a node that will delay for an hour, it would be nice to have a method to go to sleep for an hour and have a onWakeup()method called after that hour. That method then should be capable to read a sensor, transmit it, and optionally continue to sleep. the onWakeup() could return trueso it stays awake, and return false would again do a sleep for the specified amount of time.

johanstokking commented 7 years ago

@amkuipers definitely agreed. This is issue however addresses bringing the LoRa module itself to sleep, not the Arduino application code. The latter is out of scope for this library and is really device dependent.