const int buzzer = 5; //buzzer to arduino pin 5
void setup(){
pinMode(buzzer, OUTPUT); // Set buzzer - pin as an output
}
void loop(){
tone(buzzer, 2000); // Send 2KHz sound signal...
delay(1000); // ...for 1 sec
tone(buzzer, 6000); // Send 6KHz sound signal...
delay(1000); // ...for 1 sec
tone(buzzer, 9000); // Send 9KHz sound signal...
delay(1000); // ...for 1 sec
noTone(buzzer); // Stop sound...
delay(1000); // ...for 1sec
}