Muhammad_Munir
Published © GPL3+

Add Buzzer to Arduino

How to add buzzer with Arduino

BeginnerFull instructions provided15,819
Add Buzzer to Arduino

Things used in this project

Story

Read more

Schematics

sddefault_3JSG79X30W.jpg

Code

Code

Arduino
const int buzzer=11;
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(buzzer, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(buzzer, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(buzzer, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

Credits

Muhammad_Munir
79 projects • 52 followers
I am Arduino programmer, also expertise in ESP32 and 8266 wifi modules.
Contact

Comments

Please log in or sign up to comment.