// Define the LED pins
const int ledPins[] = {0, 1, 2, 3, 4, 5}; // Pins connected to LEDs
void setup() {
// Initialize the LED pins as outputs
for (int i = 0; i < 6; i++) {
pinMode(ledPins[i], OUTPUT);
}
}
void loop() {
// Chase the LEDs forward
for (int i = 0; i < 6; i++) {
digitalWrite(ledPins[i], HIGH);
delay(100);
digitalWrite(ledPins[i], LOW);
}
// Chase the LEDs backward
for (int i = 4; i > 0; i--) {
digitalWrite(ledPins[i], HIGH);
delay(100);
digitalWrite(ledPins[i], LOW);
}
}
tiny:PB5
tiny:PB3
tiny:PB4
tiny:GND
tiny:PB0
tiny:PB1
tiny:PB2
tiny:VCC
r1:1
r1:2
led:A
led:C
led1:A
led1:C
led2:A
led2:C
led3:A
led3:C
led4:A
led4:C
led5:A
led5:C