int timer = 100;
int ledPins[] = {
2, 7, 4, 6, 5, 3
};
int pinCount = 6;
void setup() {
for (int thisPin = 0; thisPin < pinCount; thisPin++){
pinMode(ledPins[thisPin], OUTPUT);
}
}
void loop() {
for (int thisPin = 0; thisPin < pinCount; thisPin++){
digitalWrite(ledPins[thisPin], HIGH);
delay(timer);
digitalWrite(ledPins[thisPin]), LOW);
}
for (int thisPin = pinCount - 1; thisPin>= 0; thisPin--){
digitalWrite(ledPins[thisPin], HIGH);
delay(timer);
digitalWrite(ledPins[thisPin],LOW);
}
}
/code]
why do I keeps on haveing this error. I've follow word to word from the tutorial and I counld find any differences
Do you see the extra right parenthese on this line?
digitalWrite(ledPins[thisPin]), LOW);
By the way, putting the error message by hand into the title is a bad way to go. It leaves out valuable information and causes some things to be spelled incorrectly. In the future, error messages should be copied and pasted between code tags.
By the same token, copying code by hand from a tutorial is going to create errors that you cannot easily find.