const int ledPin = 13;
const int speakerPin = 9;
void setup() {
// put your setup code here, to run once:
pinMode(ledPin, OUTPUT);
pinMode(speakerPin, OUTPUT);
}
void loop() {
// Turn on the LED
digitalWrite(ledPin, HIGH);
// Turn on the Speaker
tone(speakerPin, 1000); // You can adjust the frequency for the desired tone
// Wait for 1 second
delay(1000);
// Turn off the LED
digitalWrite(ledPin, LOW);
// Turn off the Speaker
noTone(speakerPin);
// Wait for 1 second
delay(1000);
}