Products

News

Contact Us

Phone

Current Position > Products

Product Name: KEYES Active buzzer module with demo code

active buzzer module
Buzzer is an integrated structure of electronic transducers, DC power supply, widely used in computers, printers, copiers, alarms, electronic toys, automotive electronic equipment, telephones, timers and other electronic products for sound devices . Active buzzer 5V Rated power can be directly connected to a continuous sound, this section dedicated sensor expansion module and the Arduino board in combination, can complete a simple circuit design, to "plug and play."

active buzzer module

Buzzer is an integrated structure of electronic transducers, DC power supply, widely used in computers, printers, copiers, alarms, electronic toys, automotive electronic equipment, telephones, timers and other electronic products for sound devices . Active buzzer 5V Rated power can be directly connected to a continuous sound, this section dedicated sensor expansion module and the Arduino board in combination, can complete a simple circuit design, to "plug and play."


Arduino test code:
int speakerPin = 8 ;/ / control horn pin
 int potPin = 4 ;/ / control pin adjustable resistor
 int value = 0;
 void setup ()
{
 pinMode (speakerPin, OUTPUT);
 }
 void loop () {
value = analogRead (potPin); reading resistor values pin
 digitalWrite (speakerPin, HIGH);
delay (value); adjust the speaker sound of the time;
 digitalWrite (speakerPin, LOW);
delay (value); adjust the speaker does not ring a time;
 }