Can it be done? (Countdown timer that survives wait or sleep)
Development
21
Posts
6
Posters
6.0k
Views
4
Watching
-
@TheoL With regards the LED's, I slightly changed the logic so they count down, rather than up, i.e. they extinguish as each hour passes until the 4th hour.
I don't see an issue with the current rain sensor / moisture sensor logic, I'm ensuring a reading is taken, but not seeing it unless they've changed? The number you see there now is only because I was testing, normally they're either
lastMoistureValue = moistureValue OR lastRainValue = rainValue
The main issue I see is that I need to countdown to be in sync with
if (lastMoistureValue == 0 || lastRainValue == 0)
so if (lastMoistureValue == 0 || lastRainValue == 0) is true on each loop, then the countdown LED's are reset also.
I'll no doubt change the loop wait to much longer once deployed.