Skip to content

Instantly share code, notes, and snippets.



Last active Jul 21, 2018
What would you like to do?
const int buzzer = 8; //buzzer to arduino pin 8
void setup(){
pinMode(buzzer, OUTPUT); // Set buzzer - pin 8 as an output
void loop(){
tone(buzzer, 1000); // Send 1KHz sound signal...
delay(1000); // for 1 sec
noTone(buzzer); // Stop sound
delay(1000); // for 1sec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment