sandeepmistry / arduino-LoRa

An Arduino library for sending and receiving data using LoRa radios.
MIT License
1.65k stars 630 forks source link

Sleeping the radio #377

Closed BrendonHills closed 4 years ago

BrendonHills commented 4 years ago

I want to put the radio to sleep when I put the processor to sleep & I can see that there are three possible ways to save radio power consumption:

LoRa.idle(); LoRa.sleep(); and LoRa.end()

Which will save most power whilst the main processor is sleeping? Is it quick, relaible and easy to 'wake-up' from these states? How do I 'wake-up' or re-start from any of these states - must I run 'LoRa.begin(frequency);' in the ISR or main loop, or some other command?

I am using the Adafruit Feather 32u4 RFM95 HOPE RF boards.

Thank you for any assistance.

IoTThinks commented 4 years ago

LoRa.end then LoRa.begin After deep sleep, the MCU runs setup() again anyway.

BrendonHills commented 4 years ago

Thanks! I didn’t realise setup() was run again – how does that fit in with the ISR?

If the hardware interrupt triggers the ISR, does it run setup after the ISR or before?

From: "IoTThinks.com" notifications@github.com Reply to: sandeepmistry/arduino-LoRa reply@reply.github.com Date: Friday, 19 June 2020 at 02:17 To: sandeepmistry/arduino-LoRa arduino-LoRa@noreply.github.com Cc: BrendonHills daimontilley@hotmail.com, Author author@noreply.github.com Subject: Re: [sandeepmistry/arduino-LoRa] Sleeping the radio (#377)

LoRa.end then LoRa.begin After deep sleep, the MCU runs setup() again anyway.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sandeepmistry/arduino-LoRa/issues/377#issuecomment-646382759, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APZV26GXY2H54TQJQIQFTLLRXK4CZANCNFSM4OCFKPVA.

IoTThinks commented 4 years ago

Try it yourself.