Hope you are well.
I have a little tricky trouble with automating a relay using millis function. The point is: I have created, using Arduino Uno, Nokia LCD display and buttons, a menu than allow me to do different things. Currently I am using millis to track the time (I’m waiting for an RTC module) and depends on my settings it turns ON or OFF a relay for a certain amount of time. Till here everything goes well but when I manually shut ON or OFF a relay some problems come.
I will explain it by an example: I have a small seeding house for my vegetable garden and I have to keep the light for 18 hours ON and 6 hours OFF but the light it’s annoying during my daily maintenance so I have to turn it OFF, after that the timing doesn’t work correctly.
I really cannot understand how get out of it.
Thanks for any suggestion.
sketch_apr18a.ino (27.3 KB)