Created
June 5, 2018 03:57
-
-
Save schappim/136b056448d280f880eee2860378727c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int buzzer = 9; //buzzer to arduino pin 9 | |
void setup() { | |
pinMode(buzzer, OUTPUT); // Set buzzer - pin 9 as an output | |
} | |
void loop() { | |
tone(buzzer, 1000); | |
delay(1000); // on for 1 sec | |
noTone(buzzer); // Stop sound | |
delay(1000); // on for 1sec | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment