int buzzerPin = 9; // Define the buzzer pin
void setup() {
pinMode(buzzerPin, OUTPUT); // Set the buzzer pin as an output
}
void loop() {
// Generate a 1000 Hz tone on the buzzer pin for 1 second
tone(buzzerPin, 1000);
delay(1000); // Wait for 1 second
noTone(buzzerPin); // Stop the tone
delay(1000); // Wait for 1 second
}