Why wont this for loop work??
for (int j=1 j<=10; j+j+1 ){
digitalWrite(blueLEDpin,HIGH); //turns blue LED on
delay(blueWaitTimeOn); //delays the code
digitalWrite(blueLEDpin,LOW); //turns blue LED off
delay(blueWaitTimeOff); //delays the code
}
Why wont this for loop work??
for (int j=1 j<=10; j+j+1 ){
digitalWrite(blueLEDpin,HIGH); //turns blue LED on
delay(blueWaitTimeOn); //delays the code
digitalWrite(blueLEDpin,LOW); //turns blue LED off
delay(blueWaitTimeOff); //delays the code
}
for (int j=1;j<=10; j++ ){?
Define "work"
j+j+1
What's that?
Welcome to the Forum. Please read the post by Nick Gammon at the top of this Forum on the proper way to use this resource, especially using code tags when you post code here. As danable pointed out, your third expression in the for loop makes no sense. Take a look at some for loop examples and you'll see how it should be used.
It's actually the second part of the expression because the first semicolon is absent....
You're right. Hopefully he'll look at some examples and see that there should be three expressions in the for loop.