// Define the two LED pins
const int LED1_PIN = 2; // Replace with the actual pin numbers you are using
const int LED2_PIN = 3; // Replace with the actual pin numbers you are using
const int BUZZER_PIN = 11; // Changed to pin 11
void setup() {
// Initialize LED and buzzer pins as outputs
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(BUZZER_PIN, OUTPUT);
}
void loop() {
// Turn on LED1 and turn off LED2
digitalWrite(13, HIGH);
digitalWrite(12, LOW);
// Turn on the buzzer to produce a high tone (siren up)
tone(BUZZER_PIN, 1000); // High frequency
delay(800); // Wait for 200 milliseconds
// Turn off LED1 and turn on LED2
digitalWrite(13, LOW);
digitalWrite(12, HIGH);
// Turn on the buzzer to produce a low tone (siren down)
tone(BUZZER_PIN, 400); // Low frequency
delay(800); // Wait for 200 milliseconds
}