int buzzerPin = 12; //Naming the pin
void setup() {
// put your setup code here, to run once:
pinMode(buzzerPin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
tone(buzzerPin, 500); //Pin 12 and a frequency of 1000 hz
delay(200); //Delay of 1 second
noTone(12); //Stops the buzer from making a sound);
delay(200);
tone(buzzerPin, 500); //Pin 12 and a frequency of 1000 hz
delay(200); //Delay of 1 second
noTone(12); //Stops the buzer from making a sound);
delay(200);
tone(buzzerPin, 500); //Pin 12 and a frequency of 1000 hz
delay(200); //Delay of 200 mili seconds and 2 seconds
noTone(12); //Stops the buzer from making a sound);
delay(2000); //Makes the buzzer stay for 2 seconds
}