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