- I didn’t replace the sensor nor the frame counter , it’s still the bme280
- this board uses a different technique for sleep, it’s not the processor that wakes up and then wakes the radio module RN2483 but the other way.
that saves some energy, especially when you have long sleep periods (like one week)
the processor doesn’t have to wake up every 8 seconds to increase a counter and get back to sleep, it sleeps all the time until woken by the rn2483.
I use it for 5 min #define SLEEP_PERIOD 300000 // max = 4294967296 - 49.7days
see test code here
sends the rn2483 to sleep
attachInterrupt (digitalPinToInterrupt(2), awake, LOW);
set the interrupt for the mcu on pin 2
when the rn2483 wakes up it sets the Tx line low, on that signal the MCU wakes
LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
set the MCU to sleep
so at this point in the loop both are a sleep, when the rn2483 wakes up, it wakes the processor and
returns in the loop were it start again with