Open daghemo opened 6 years ago
Maybe I'm wrong, but I think that the following code from the WakePiPeriodicallyDuringDay example is not good:
if((now.hour() >= WakeUp_StartHour) && now.minute() >= WakeUp_StartMinute) { if((now.hour() <= Bedtime_StartHour) && now.minute() <= Bedtime_StartMinute)
Just try with WakeUp set to 7:00 and Bedtime set to 20:00. Both conditions will match only if now.minute() is 00, that is only in the first minute of every hour, not every minute of every hour in the WakeUp/Bedtime time range.
I agree with @daghemo, I tried using this example code and could not get it working until I looked at these if statements.
Maybe I'm wrong, but I think that the following code from the WakePiPeriodicallyDuringDay example is not good:
Just try with WakeUp set to 7:00 and Bedtime set to 20:00. Both conditions will match only if now.minute() is 00, that is only in the first minute of every hour, not every minute of every hour in the WakeUp/Bedtime time range.