Iduino SE044 User guide

IDUINO for maker’s life
Description
Signal input pin, which can be driven by square wave signal
Power(3.3V/5V), you may not see this mark on the board, it’s the middle pin
Ground
Passive Buzzer(SE044)
1 Introduction
This module is similar with the Active Buzzer, the only difference is that this module only can be driven square wave signal, not DC signal.
2 pinout
3 Example Here is a example that driven the Passive buzzer sound. The connection as below:
www.openplatform.cc
IDUINO for maker’s life
********Code begin********
int buzzer = 8 ;// setting controls the digital IO foot buzzer
void setup ()
{
pinMode (buzzer, OUTPUT) ;// set the digital IO pin mode, OUTPUT out of Wen
}
void loop ()
{
unsigned char i, j ;// define variables
while (1)
{
for (i = 0; i <80; i++) // Wen a frequency sound
{
digitalWrite (buzzer, HIGH) ;// send voice
delay (1) ;// Delay 1ms
digitalWrite (buzzer, LOW) ;// do not send voice
delay (1) ;// delay ms
}
for (i = 0; i <100; i++) // Wen Qie out another frequency sound
{
digitalWrite (buzzer, HIGH) ;// send voice
delay (2) ;// delay 2ms
digitalWrite (buzzer, LOW) ;// do not send voice
www.openplatform.cc
Loading...
+ 2 hidden pages