Last active
July 21, 2018 11:02
-
-
Save li2hub/de51f379c2f37ff25b5e4e39c6804f08 to your computer and use it in GitHub Desktop.
This file contains 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 = 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