Active Buzzer
Category:
Subcategory:
Signal Type:
n/a
IDeATe Component Number:
0498
Makes a high-pitched beeping sound when powered with a steady (direct current) power source.
Active Buzzer
About

Active buzzers have a built-in frequency and loudness, and thus are simple to wire: they only need power and ground. You should power them with DC (not AC, as they need a constant current to produce sound). These are mainly useful for signaling or an alarm.

Getting started
Active buzzer schematic for code below
Active buzzer schematic for code below
const int buzzerPin = 8;

void setup() {
  pinMode(buzzerPin, OUTPUT); // initialize digital pin 8 as an output
}

void loop() {
  digitalWrite(buzzerPin, HIGH); // turn the buzzer on (HIGH is the voltage level)
  delay(1000); // wait for a second
  digitalWrite(buzzerPin, LOW); // turn the buzzer off by making the voltage LOW
  delay(1000); // wait for a second
}
Resources
Related Components