Last active
March 13, 2026 00:10
-
-
Save maliqq/0144b66ebf203bf0c79f62cc18649990 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 buzzerPin = 9; // Assign the buzzer to digital pin 9 | |
| void setup() { | |
| pinMode(buzzerPin, OUTPUT); // Set the buzzer pin as an output | |
| } | |
| void loop() { | |
| tone(buzzerPin, 1000); // Send a 1KHz sound signal | |
| delay(1000); // Pause for 1 second | |
| noTone(buzzerPin); // Stop the sound signal | |
| delay(1000); // Pause for another 1 second | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment