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

Active buzzers have a oscillating source built into them, so a simple DC voltage will activate the buzzer. Though simple to use, the downside of the active buzzer is that the tone of the buzzer is fixed at a particular frequency and the loudness is more or less fixed. These are mainly useful for signaling or an alarm.

Getting started
int buzzerPin = 4;

void setup() {
  pinMode(buzzerPin, OUTPUT); // initialize digital pin 4 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
Related Components