Arduino Project With Just An Active Buzzer
In my previous post I shared how to build a simple project with an active buzzer and push down button. But I’ve a question: can we build a simpler project, one which just uses the buzzer? The answer is yes.
Project Overview
In this project we are going to make the buzzer ring, wait for 1 second, switch off the buzzer, wait for 1 second, make the buzzer ring again and the cycle continues.
Components Required
- Arduino
- Active buzzer
- Jumper cables
- Bread board
Circuit Diagram
There is not much to explain in this diagram. The +ve of the buzzer is connected to pin 13 (purple) and the -ve (yellow) is connected to the GND of the Arduino.
Code
int buzzerPin = 13;
void setup() {
// put your setup code here, to run once:
pinMode(buzzerPin,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(buzzerPin,HIGH);
delay(1000);
digitalWrite(buzzerPin,LOW);
delay(1000);
}
Note: The sound of the active buzzer is really annoying. I dare you to sit for 5 minutes straight hearing it ringing.