Description
The YL-44Â is a small buzzer module which operates around the audible 2 kHz frequency range. It is an active buzzer, which means that it produces sound by itself, without needing an external frequency generator. Taking the I/O pin LOW will turn the buzzer ON and taking this pin HIGH will turn the buzzer OFF (as will leaving this pin OPEN). This device could be controlled by PWM.Features
- It and your Arduino/Chin Duino will be able to play melodies. This is a small buzzer for the Sensor Shield.
- It creates different sounds based on the different frequencies of I/O toggling.Â
- All you need to do is to plug in the buzzer module to sensor shield and tell the function which pin you'd like to use the frequency you want to hear and the duration to play that frequency.Â
- Bring oscillation sourceÂ
- Audion 9012 driveÂ
- Work Voltage:3.3-5VÂ
- Set bolt hole, easy to assembleÂ
- PCB Dimension:3.3cm*1.3cmÂ
Pin Definition:
Pin | definition |
Vcc | 3.3~5V |
GND | the Ground |
I/O | I/O interface of SCMÂ |
Package Include:Â
- 1pcs Active Buzzer Alarm ModuleÂ
- 3pcs 20cm 1p-1p DuPont cableÂ
 Code
 This code will produce a two tone output
/*Example Code for YL-44 Active buzzer
Connect Vcc to 5 volts
Connect Gnd to Gnd
Connect I/O to pin 3 */
int buzzer = 3 ;// connect the I/O pin on the buzzer to this
//Explain
void setup ()
{
pinMode (buzzer, OUTPUT) ;
}
void loop ()
{
unsigned char i, j ;// define variables
while (1)
{
for (i = 0; i <80; i++)
{
digitalWrite (buzzer, LOW) ; // Turn buzzer ON
delay (1) ;// Delay 1ms
digitalWrite (buzzer, HIGH) ;// turn buzzer OFF
delay (1) ;// delay ms
}
for (i = 0; i <100; i++) // new frequency
{
digitalWrite (buzzer, LOW) ;// turn buzzer ON
delay (2) ;// delay 2ms
digitalWrite (buzzer, HIGH) ;// turn buzzer OFF
delay (2) ;// delay 2ms }
}
}