0

Count loop - not working?

Hello everyone, I've got a very strange question that I hope someone can answer. I've a loop that should work but I can't figure out for the life of me why it is not. I have the following circuit and the following code but the LED blinks continuously. Any help would be greatly appreciated

int counter;

void setup()
{
pinMode(8, OUTPUT);
}

void loop()
{
for (counter = 0; counter < 3; ++counter) {
digitalWrite(8, HIGH);
delay(1000); // Wait for 1000 millisecond(s)
digitalWrite(8, LOW);
delay(1000); // Wait for 1000 millisecond(s)
}
}

 

0 comments

Please sign in to leave a comment.