I am complete newbie but I have a set up with three LED's dancing to my tune with no problems but, if I try to introduce a 'for loop' into the void loop, the 'for' does not appear to be recognised, it does not change colour and the sequence of flashes and delays doesn't change either.
void loop (){
for (int j=1; j<=5; j=j+1);}
{
digitalWrite (redLEDPin, HIGH); // red LED switch on
delay (redLEDPinOn); // LED time on
digitalWrite (redLEDPin, LOW); // red LED switch off
delay (redLEDPinOff); // LED time off
}
digitalWrite(greenLEDPin, HIGH); // green LED switch on
delay(greenLEDPinOn); // LED time on
digitalWrite(greenLEDPin, LOW); // green LED switch off
delay(greenLEDPinOff); // LED time off
digitalWrite(whiteLEDPin, HIGH); // white LED switch on
delay(whiteLEDPinOn); // LED time on
digitalWrite(whiteLEDPin, LOW); // white LED switch off
delay(whiteLEDPinOff); // LED time off}
}
I have tried this on two different machines with exactly the same results so it must be me. Any tips would be gratefully received.
Philip