Is there a limit on serial?

Just a quick question of if there is a limit to how long the Arduino will send information to my computer. I a set of code that updated with a delay(1000); and would Serial.println(Sec); but after about 12 hours it stopped and I was wondering what my issue was any help will be greatly appreciated! Apparently new users cannot upload attachments so here's a CP of my sketch and there may be a bug with the last if statement but I couldn't tell from my troubleshooting.
Eventually it will be a clock read in binary via LEDs using a cascading clock.


int AMPM;
int Sec;
int Min1;
int Min2;
int Hour1;
int Hour2;













void setup() {
  // put your setup code here, to run once:
  Sec = 0;
  Min1 = 0;
  Min2 = 0;
  Hour1 = 0;
  Hour2 = 0;
  Serial.begin(9600);



}

void loop() {
  //initialize serial communication at 9600 bits per second:







  delay(1000);
  Sec = ( Sec + 1);
  // print //out the state of the button:

  if (Sec == 60) {
    Min1 = (Min1 + 1);
    Sec = 0;
  }
  if (Min1 == 10) {
    Min2 = (Min2 + 1);
    Min1 = 0;
  }
  if (Min2 == 6) {
    Hour1 = (Hour1 + 1);
    Min2 = 0;
  }
  if (Hour1 == 10) {
    Hour2 = (Hour2 + 1) ;
    Hour1 = 0;
  }
  if (Hour2 == 2) {
    Hour1 = 1;
    Hour2 = 0;
  }
  Serial.println(Sec);
  Serial.println(Min1);
  Serial.println(Min2);
  Serial.println(Hour1);
  Serial.println(Hour2);

Only if you program it that way, intentionally or unintentionally :wink:
But we cannot see your sketch.

Maybe there's a limit on the unnamed computer of how long it will receive.

They're all already zero.

Please remember to use code tags when posting code.

(Why) so (many) parentheses?

Is that supposed to tell us something? Looks like some random stuff on some random screen.

Read the instructions on how to post code so you can correct your first posting above and show us the serial output the same way.

It looks like it only counted up to 27 minutes before stopping. I know the hours didn't roll over to 00 because after counting from 00 to 19 the hours roll over to 01, not 00. Maybe the power supply is glitching?

Should be...

if (Hour2 == 2 && Hour1 == 4) 
{
  Hour2 = 0;
  Hour1 = 0;
}

I don't think the Arduino cares how much or little it is being worked, so the best explanation is likely that the receiving computer went into a sleep or standby mode for some reason? But 12 hrs seems like a long time for that to be the explanation as well.

I would run it again and see if it stops at the same exact time, or there is some randomness to that. If random, the connection, receiving computer, power supply to Arduino are all suspects.

OP may now be MIA. :rofl: