void loop() {
// loop from the lowest pin to the highest:
- for (int thisPin = 2; thisPin <= 9; thisPin++) {
+ for (int thisPin = 2; thisPin < 9; thisPin++) {
// turn the pin on:
digitalWrite(thisPin, HIGH);
delay(timer);
}
// loop from the highest pin to the lowest:
- for (int thisPin = 9; thisPin >= 2; thisPin--) {
+ for (int thisPin = 9; thisPin > 2; thisPin--) {
// turn the pin on:
digitalWrite(thisPin, HIGH);
delay(timer);