The Buzzer Module by Naresh (Part ID: 1) is an electronic sound-producing device that can be used in a variety of applications, from simple alert systems to complex musical interfaces. It is commonly used in alarm clocks, computers, confirmation of user input (like button presses), and many other scenarios where an audible signal is required.
Pin Number | Name | Description |
---|---|---|
1 | VCC | Connect to 3.3V or 5V power supply |
2 | GND | Connect to the ground of the circuit |
3 | SIG | Signal input, controls the buzzer |
// Define the buzzer control pin
#define BUZZER_PIN 8
void setup() {
// Set the buzzer pin as an output
pinMode(BUZZER_PIN, OUTPUT);
}
void loop() {
// Turn on the buzzer
digitalWrite(BUZZER_PIN, HIGH);
delay(1000); // Buzzer on for 1 second
// Turn off the buzzer
digitalWrite(BUZZER_PIN, LOW);
delay(1000); // Buzzer off for 1 second
}
This simple example toggles the buzzer on and off every second.
Q: Can I use the buzzer with a 3.3V system? A: Yes, the buzzer can operate at 3.3V, but the sound output may be lower compared to 5V.
Q: Is it possible to control the volume of the buzzer? A: The volume is not directly controllable; it is determined by the voltage and current supplied to the buzzer. However, you can create a perceived volume control by rapidly toggling the signal pin to create a PWM (Pulse Width Modulation) effect.
Q: Can I play different tones with this buzzer? A: This depends on whether the buzzer is an active or passive type. An active buzzer only produces a single tone when powered, while a passive buzzer can be controlled to produce different tones by generating different frequencies with the signal pin.
For further assistance, please contact Naresh customer support.