수동 버저 모듈
(Passive Buzzer Module)
개요
- 본 제품은 passive buzzer 모듈입니다. active buzzer는 삐삐 소리만 낼수 있는데 반해,
- Passive buzzer는 다양한 소리를 낼수 있습니다.
스펙
- Passive Buzzer Module
- Buzzer type: Passive
- Working voltage:3.5-5.5V
- Working current:<25mA
- Pin Connector : 3 Pin (버저를 왼쪽에 핀을 오른쪽에 놓고 보았을때, 위에서부터 순서대로 signal, 5V, GND 입니다)
문서(예제)
-
int buzzer=11;//
void setup()
{
pinMode(buzzer,OUTPUT);//
}
void loop()
{
unsigned char i,j;//
while(1)
{
for(i=0;i<80;i++)//output sound of one frequency
{
digitalWrite(buzzer,HIGH);//make a sound
delay(1);//delay 1ms
digitalWrite(buzzer,LOW);//silient
delay(1);//delay 1ms
}
for(i=0;i<500;i++)//output sound of another frequency
{
digitalWrite(buzzer,HIGH);//make a sound
delay(2);//delay 2ms
digitalWrite(buzzer,LOW);//silient
delay(2);//delay 2ms
}
}
}