// Define pin numbers
const int ledPin1 = 1; // First LED
const int ledPin2 = 2; // Second LED
const int buzzerPin = 3; // Buzzer
void setup() {
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(buzzerPin, OUTPUT);
}
void loop() {
// Turn on the first LED
digitalWrite(ledPin1, HIGH);
// Turn off the second LED
digitalWrite(ledPin2, LOW);
// Play a high-pitched tone
tone(buzzerPin, 1000);
delay(250); // Wait for 250 milliseconds
// Turn off the first LED
digitalWrite(ledPin1, LOW);
// Turn on the second LED
digitalWrite(ledPin2, HIGH);
// Play a low-pitched tone
tone(buzzerPin, 500);
delay(250); // Wait for 250 milliseconds
}