I need some guidance, direction, and help with a project.
I have an Arduino Nano connected to seven relays labeled Sunday through Saturday. The Nano will need a way to sync the date and time with the computer every few seconds. The computer and Nano time must always match to the second. If the date & time change on the server, it must immediately update the date & time on the Nano. The Nano will have a continuous connection to my Windows computer for this reason.
I need to create a program to run on a Windows computer where I can enter a start time to turn on one of seven relays. This start time will be the time the relay that matches the current day turns on and will stay on for 24 hours, turns off and then turns on the next day relay for the next 24 hours, and so forth and so on.
Example: If the current day is Tuesday at 2 PM and you set the start time to start at 4:05 PM. The program should turn the Monday relay on. (Since it's not Tuesday at 4:05 PM yet.) And when the time actually is 4:05 PM, the Monday relay turns off and the Tuesday relay turns on for 24 hours. It turns off at 4:05 PM on Wednesday and the Wednesday relay turns on for 24 hours. And so on and so on, turning the relays in date order on and off every 24 hours, day after day, week after week, month after month, unless I change the start time in the Windows application.
One and only one relay can be on at any given time.
Thanks for your help in advance.