I currently have some code that lets me input the seconds, minutes, and hours into a function which will then change the values respectively on a clock i built. My question is if there is any way to easily synch this with real time from my computer or something. this is the current code I have which will loop through all the seconds from midnight to midnight.
Edit: I have the computer connected through the USB that you use to Upload code.
void loop()
{
for(int i=0; i <=86400; i++){
int sec = i %60;
int min = i/60 %60;
int hr = i/60 /60 %60;
Time_Refresh(sec,min,hr);
delay(1000);
}
yea i know that this wont be accurate forever, it is more to test if everything works. a problem with using a clock module is that I have run out of pins to use. is there a way to add extra pins?
I am using an arduino Uno and have used pins 0-13 and A0-A5
alright thank you so much!
and just to clarify using the clock module i would be able to somehow extract the seconds, minutes and hours in different integers correct?