Active Buzzer Module for Arduino 3.3V – 5V

8.00 ر.س

In stock

Description

Module driven by S8550 triode

2 working voltage of 3.3 V to 5 V
3 sets of fixed bolt hole, convenient installation
4 small board PCB size: 3.3 cm X 1.3 cm

2 Module interface specification (3 wire system)
1 VCC external 3.3 V to 5 V voltage (which can be directly connected to 5 V microcontroller and 3.3 V microcontroller)
2 GND external GND
3 I/O external microcontroller IO port

 

 

Cabling & Coding

Connections:

Cabling Vedio:

Code:

int buzzPin= 12; // I/O-pin from buzzer connects here

const int wpm = 20; // Morse speed in WPM

const int dotL = 1200/wpm; // Calculated dot-length

const int dashL = 3*dotL; // Dash = 3 x dot

const int sPause = dotL; // Symbol pause = 1 dot

const int lPause = dashL; // Letter pause = 3 dots

const int wPause = 7*dotL; // Word pause = 7 dots

void setup()

{

pinMode(buzzPin,OUTPUT); // Set buzzer-pin as output

}

void loop()

{

dash();

dot();

dash();

dot();

delay(lPause-sPause); // Subtracts pause already taken

dash();

dash();

dot();

dash();

delay(wPause-sPause); // Subtracts pause already taken

}

void dot(){

digitalWrite(buzzPin, LOW); // Tone ON

delay(dotL); // Tone length

digitalWrite(buzzPin, HIGH); // Tone OFF

delay(sPause); // Symbol pause

return;

}

void dash(){

digitalWrite(buzzPin, LOW); // Tone ON

delay(dashL); // Tone length

digitalWrite(buzzPin, HIGH); // Tone OFF

delay(sPause); // Symbol pause

return;

}

Reviews

There are no reviews yet.

Be the first to review “Active Buzzer Module for Arduino 3.3V – 5V”

Your email address will not be published. Required fields are marked *

QR Code

QR Code