The code compiles just fine but when i run it using the serial monitor, only the hours are programmed, the minutes have the same value as the hour and it does not increment at all.
I have global variables named : int sethour, int setmin, int setsec, etc...
im using an IR remote to program the hour, min, sec, etc...
the code for that looks like
void loop() {
int buttonValue = digitalRead(RECV_PIN);
while (irrecv.decode (&results)) {
Serial.println("Input the hour using the remote. (Military time 1-24) \n For example: Three am would be 0 followed by 3, 1 pm would be 1 followed by 3");
Serial.println("\n");
if (results.value == zero){
sethour = 0;
cycle = false;
}
else if (results.value == one){
sethour = 1;
cycle = false;
}
etc....
needs revision but used as is for the moment
and toward the end of void loop() there is:
setTime(sethour,setmin,setsec,setday,setmonth,setyear);
originally the header file for the time code states the parameters in the setTime(); function as :
setTime(int hr,int min,int sec,int day, int month, int yr);
I posted a topic called "loop repeats, something something, whats going on?" with the code im using.