int Sec = 0; int Min = 0; int Hrs = 0; bool PM = 0; void setup() { Serial.begin(9600); } void loop() { delay (1000); //Runs the loop every 1 second Sec ++; if (Sec==59) //On the 59th loop/sec increment minute and reset seconds { Min ++; Sec==0; } }