My for loop wont work

Help I have a project due tonight and I can’t get my for loop to work. I have tried changing the position and it still doesn’t work

ShawTreyC4A.ino (1.08 KB)

    for (count = 0, count < 5000, count++)

You are using comma where you should use semicolon.

      if (BS2 == LOW)
      {
        lcd.clear();
        lcd.setCursor(0, 0);
        lcd.print("Hold to reset");
        delay(100);
        int    count = 0;
      }

Here you are creating a new variable named ‘count’, setting it to 0, and not using it. If you want to set the global variable ‘count’ to zero you should not re-declare the name. Just say “count = 0;”.

Hi,
Is this related to this?

Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Tom.. :slight_smile: