#13Beginner
Buzzer Usage
4.7(84)
135 completed

Basic project that uses the buzzer to emit a sound at a specific frequency and interval. Teaches the use of tone() and noTone() functions.
Video
Circuit Diagram

Source Code
1int frequency = 400;
2int buzzerPin = 7;
3
4void setup() {
5}
6
7void loop() {
8 tone(buzzerPin, frequency);
9 delay(300);
10 noTone(buzzerPin);
11 delay(300);
12}