// Define the GPIO pins for the LEDs
const int ledPin1 = 2; // Change to the GPIO pin connected to the first LED
const int ledPin2 = 4; // Change to the GPIO pin connected to the second LED
const int ledPin3 = 5; // Change to the GPIO pin connected to the third LED
void setup() {
// Initialize the GPIO pins as outputs
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
}
void loop() {
// Turn on the first LED
digitalWrite(ledPin1, HIGH);
// Turn off the second and third LEDs
digitalWrite(ledPin2, LOW);
digitalWrite(ledPin3, LOW);
// Wait for 500 milliseconds
delay(500);
// Turn off the first LED and turn on the second LED
digitalWrite(ledPin1, LOW);
digitalWrite(ledPin2, HIGH);
// Wait for 500 milliseconds
delay(500);
// Turn off the second LED and turn on the third LED
digitalWrite(ledPin2, LOW);
digitalWrite(ledPin3, HIGH);
// Wait for 500 milliseconds
delay(500);
// Turn off the third LED
digitalWrite(ledPin3, LOW);
// Wait for 500 milliseconds
delay(500);
}