Passzív zümmer.
Két lábon hajtható, meghajtásához jelgenerálás szükséges, a kívánt frekvenciával.
Passzív zümmer
Feszültség: 3,5-5,5 V
Áram: <25 mA
NYÁK méret: 18,5 mm x 15 mm (szélesség x hosszúság)
Feature:
DIY parts
Color: black
Size:26 x 15 x 10mm
Brand new compatible passive speaker buzzer module
Features control the buzzer sounds
Compatible and mini design
Made of PCB material
Példa meghajtás, minta program:
Négyszögjellel (2-5KHz-cel)
int buzzer=8;// Set the control the buzzer digital IO pin
void setup() {
pinMode(buzzer,OUTPUT);// Setting the digital IO pin mode , OUTPUT is Wen out
}
void loop() {
unsigned char i,j;// Define the variable
while(1) {
for(i=0;i<80;i++) { // Wen a frequency sound
digitalWrite(buzzer,HIGH);// Sound
delay(1);//delay 1ms
digitalWrite(buzzer,LOW);//Not sound
delay(1);// delay 1ms
}
for(i=0;i<100;i++) { // Wen out another frequency sound
digitalWrite(buzzer,HIGH);// Sound
delay(2);//delay 2ms
digitalWrite(buzzer,LOW);// Not sound
delay(2);//delay 2ms
}
}
}