const int buzzer = 8; //buzzer to arduino pin 9 void setup() { // put your setup code here, to run once: pinMode(buzzer, OUTPUT); // Set buzzer - pin 9 as an output } void loop() { // put your main code here, to run repeatedly: digitalWrite(buzzer, HIGH); // Send 1KHz sound signal delay(1000); // for 1 sec digitalWrite(buzzer,LOW); // Stop sound delay(1000); // for 1sec }