aarg:
Learn the skill of code factoring...lcd.setCursor(5, 3);
if ((now.hour() >= 10) && (now.hour() < 17))
{
lcd.print("Open window");
}
else
{
lcd.print("Closed window");
}
delay(30);
All I did was look for repetition and redundant tests.
Hello
Thanks for your comment
Well this code works, but since I also want to test sensors along with the schedules, I think the best option is with the (if)!
Of course, all ideas are welcome.
It would be interesting to know how to compare with the full hours as well,
if ((now.hour () <10:00) || (now.hour ()> = 18:00))