int blue_led = 2; // the blue led is connected to pin 2
int green_led = 3; // the green led is connected to pin 3
int yellow_led = 4; // the yellow led is connected to pin 4
int red_led = 5; // the red led is connected to pin 5
int white_led = 6; // the white led is connected to pin 6
void setup() {
pinMode(blue_led, OUTPUT);
pinMode(green_led, OUTPUT);
pinMode(yellow_led, OUTPUT);
pinMode(red_led, OUTPUT);
pinMode(white_led, OUTPUT);
}
void loop() {
digitalWrite(blue_led, HIGH); // turn on the blue led
digitalWrite(green_led, LOW); // turn off the green led
digitalWrite(yellow_led, LOW); // turn off the yellow led
digitalWrite(red_led, LOW); // turn off the red led
digitalWrite(white_led, LOW); // turn off the white led
delay(1000);
digitalWrite(blue_led, LOW); // turn off the blue led
digitalWrite(green_led, HIGH); // turn on the green led
digitalWrite(yellow_led, LOW); // turn off the yellow led
digitalWrite(red_led, LOW); // turn off the red led
digitalWrite(white_led, LOW); // turn off the white led
delay(1000);
digitalWrite(blue_led, LOW); // turn off the blue led
digitalWrite(green_led, LOW); // turn off the green led
digitalWrite(yellow_led, HIGH); // turn on the yellow led
digitalWrite(red_led, LOW); // turn off the red led
digitalWrite(white_led, LOW); // turn off the white led
delay(1000);
digitalWrite(blue_led, LOW); // turn off the blue led
digitalWrite(green_led, LOW); // turn off the green led
digitalWrite(yellow_led, LOW); // turn off the yellow led
digitalWrite(red_led, HIGH); // turn on the red led
digitalWrite(white_led, LOW); // turn off the white led
delay(1000);
digitalWrite(blue_led, LOW); // turn off the blue led
digitalWrite(green_led, LOW); // turn off the green led
digitalWrite(yellow_led, LOW); // turn off the yellow led
digitalWrite(red_led, LOW); // turn off the red led
digitalWrite(white_led, HIGH); // turn on the white led
delay(1000);
}