Hello
I want to check the uptime of Moteino (then I will send it via LoRa)
so I have in code millis() function
uptime = uptime+(millis()/1000);
srv_data.uptime = uptime; //server uptime in _seconds_
then I send this srv_data via radio.
it works only if Moteino doesn't use sleep mode.
If Moteino has a sleep mode via
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
I assume that it sleep 8 seconds
1 time per cycle.
But then I receive wrong uptime variable - it a far less that real time from the start of Moteino.
It seems that I need take into account the time when Moteino is sleeping.
So I decided just add +8sec to uptime but this lead to another issue - uptime start to grow very fast and after 5 real minutes it can show about 10 min!
Please advice..