Keyestudio Passive Buzzer Alarm Module for Arduino
โมดูล Keyestudio Passive Buzzer Alarm ใช้ไฟเลี้ยง 3.3 - 5V เป็นโมดูลที่สร้างเสียงเตือนได้อย่างง่าย ๆ ตัวโมดูลผลิตจาก Keyestudio ซึ่งมีเสถียรภาพ และ ประสิทธิ์ภาพในการทำงานที่ดี
ในการต่อใช้งาน สามารถต่อกับขา Arduino ได้โดยตรง โดยให้ ต่อขา + ของ Keyestudio Passive Buzzer Alarm เข้ากับไฟ 5V , ขา – ต่อกับขา GND และ ขา S เข้ากับขาดิจิตอล ของ Arduino
ในการสั่งให้โมดูลมีเสียง ทำได้โดยการสั่งขาดิจิตอล ที่ต่อกับขา S ของ โมดูลให้เป็น HIGH
Introduction
We can use Aduino to make many interactive works of which the most commonly used is acoustic-optic display. All the previous experiment has something to do with LED. However, the circuit in this experiment can produce sound. Normally, the experiment is done with a buzzer or a speaker while buzzer is simpler and easier to use. The buzzer we introduced here is a passive buzzer. It cannot be actuated by itself, but by external pulse frequencies. Different frequencies produce different sounds. We can use Aduino to code the melody of a song, which is actually quite fun and simple.
Specification
Working voltage: 3.3-5v
Interface type: digital
Sample Code:
int buzzer = 8; //set digital IO pin of the buzzer
void setup()
{
pinMode(buzzer, OUTPUT); // set digital IO pin pattern, OUTPUT to be output
}
void loop()
{ unsigned char i, j; //define variable
while (1)
{ for (i = 0; i < 80; i++) // output a frequency sound
{ digitalWrite(buzzer, HIGH); // sound
delay(1);//delay1ms
digitalWrite(buzzer, LOW); //not sound
delay(1);//ms delay
}
for (i = 0; i < 100; i++) // output a frequency sound
{
digitalWrite(buzzer, HIGH); // sound
digitalWrite(buzzer, LOW); //not sound
delay(2);//2ms delay
}
}
}
After downloading the program, the buzzer experiments are finish.
See product video:
Package includes:
1 x Standard Passive Buzzer Module