“Microduino-Buzzer”的版本间的差异
(Created page with "{{Language|Microduino-Buzzer }} {| style="width: 800px;" |- | 400px|thumb|right| Microduino-Buzzer Microduino-Buzzer is passive just like a ma...") |
|||
(未显示2个用户的2个中间版本) | |||
第1行: | 第1行: | ||
− | {{Language|Microduino-Buzzer }} | + | {{Language|Microduino-Buzzer}} |
{| style="width: 800px;" | {| style="width: 800px;" | ||
|- | |- | ||
| | | | ||
[[File: Microduino-BUZZER.jpg|400px|thumb|right| Microduino-Buzzer]] | [[File: Microduino-BUZZER.jpg|400px|thumb|right| Microduino-Buzzer]] | ||
− | + | Microduino-Buzzer is a passive buzzer. Like a magnetic speaker, it needs voltage with different frequency so that it can make sound accordingly. The pitch becomes louder when the frequency gets higher. | |
− | Microduino-Buzzer is passive | ||
2015年11月1日 (日) 04:39的最新版本
Language | English |
---|
Microduino-Buzzer is a passive buzzer. Like a magnetic speaker, it needs voltage with different frequency so that it can make sound accordingly. The pitch becomes louder when the frequency gets higher.
Feature
Specification
Document
DevelopmentIt 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.
}
}
PurchaseHistoryImage
|