Microduino-BUZZER

来自Microduino Wikipedia
1304410487@qq.com讨论 | 贡献2015年7月7日 (二) 06:27的版本 (Created page with "{{Language|Microduino-Buzzer }} {| style="width: 800px;" |- | 400px|thumb|right| Microduino-Buzzer Microduino-Buzzer is passive just like a ma...")
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索
Language English

Microduino-Buzzer is passive just like a magnetic speaker. It needs voltage with different frequency and thus can make sound accordingly. The sound becomes louder when the frequency gets higher.



Feature

  • Controllable sound frequency (eg: You can achieve the effect of piano spectrum with it. )
  • Small size and beautiful

Specification

  • Operation voltage—3.3V~5V;
  • 1.27mm pitch and 4Pin interface;


Document

Development

It can be used to make various kinds of sound through the buzzer.

Application

#define buzzer_pin 6
void setup()
{
  pinMode(buzzer_pin,OUTPUT);
}
 
void loop()
{
  for(int i=200;i<=800;i++)  //Increase the frequency from 200HZ to 800HZ circularly. 
  {
    tone(buzzer_pin,i);    //Output frequency in the port. 

    delay(5);      //The frequency lasts for 5ms.  
  }
  delay(1000);     //The highest frequency lasts for 1s. 
  for(int i=800;i>=200;i--)
  {
    tone(buzzer_pin,i);
    delay(10); //The frequency lasts 10ms.   
  }
}
  • Stack all the modules and then connect the interface on the back of BUZZER to the D6 digital port of Sensorhub.
  • Open IDE, copy the program to IDE, choose the right board, compile and download.
  • You can hear the alarm after download.


Purchase

History

Image

  • Front
文件:Microduino-Buzzer-F.JPG
Microduino-Cube-Station Front
  • Back
文件:Microduino-Buzzer -b.JPG
Microduino-Cube-Station Back