schedule doesn't work - Printable Version +- Virtuino Forum (https://virtuino.com/forum) +-- Forum: Virtuino (https://virtuino.com/forum/forumdisplay.php?fid=1) +--- Forum: Virtuino IoT (https://virtuino.com/forum/forumdisplay.php?fid=2) +--- Thread: schedule doesn't work (/showthread.php?tid=2145) |
schedule doesn't work - dimentiy89 - 04-16-2024 I'm trying to set up a relay on/off schedule. The problem is that all days work correctly except Sunday; on Sunday the schedule does not work at all. here is my code: Code: byte stringToByte(const char* str) RE: schedule doesn't work - dimentiy89 - 04-17-2024 (04-16-2024, 06:29 PM)dimentiy89 Wrote: I'm trying to set up a relay on/off schedule. The problem is that all days work correctly except Sunday; on Sunday the schedule does not work at all. I'll answer my own question. It turns out the week starts on Monday and not on Sunday. Monday = 0 Sunday = 6 solved it this way: Code: if (dayOfWeek > 0) |