Passive Buzzer Module

  • Passive Buzzer Module
Below the corresponding code:

//Example Code for KY-006
 
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
delay (2) ;// delay 2ms
}
}
}

Connecting
Arduino digital pin 8 --> pin 'S' of module Arduino GND --> Pin '-' of module

Write a review

Please login or register to review

Passive Buzzer Module

  • Webwinkel Keurmerk en klantebeoordelingen

  • 14 dagen bedenktijd 
  • Verzendkosten voor eigen rekening
  • Product Code: KY-006
  • Availability: 14
  • 1.95€

  • Ex Tax: 1.61€

Similar Products

Rotary Encoder Module

Rotary Encoder Module

Below you can see the corresponding code: An example project for the Rotary encoder.  /* Autho..

2.29€ Ex Tax: 1.89€

Mercury Switch / Magic Light Cup Module

Mercury Switch / Magic Light Cup Module

Below you can see the corresponding code: An example project for the KY-027/* * Author: Danny van..

2.49€ Ex Tax: 2.06€

3 Color LED Module RGB

3 Color LED Module RGB

Below the corresponding code://KY016 3-color LED module int redpin = 11; // select the pin for the ..

2.36€ Ex Tax: 1.95€

NTC Waterproof Thermistor/ Temperature sensor

NTC Waterproof Thermistor/ Temperature sensor

Length 50 cm.Below you can see the corresponding code:An example of a project for the sensor./* Aut..

2.36€ Ex Tax: 1.95€