Sold Out
KY-006 Small Passive Buzzer Main

KY-006 Small Passive Buzzer

30.00 EGP 20.00 EGP

Unlike the Active Buzzer, which generates a fixed tone when the power is connected, the passive needs a generated tone, as a loudspeaker does, to make it operate. This buzzer is almost identical in appearance to the Active Buzzer.

Either PWM or simply switching a digital pin on then off,  the frequency being determined by the length of the delay between switching on and off.

Out of stock


SKU: KY-006 Category: Tags: , , , , , , , , , ,
Join Waitlist

Product Description

Required Hardware Devices

  • Arduino controller × 1
  • KY-006 Small Passive Buzzer
  • USB data cable × 1

Connecting

Arduino digital pin 8 –> pin ‘S’ of module
Arduino GND –> Pin ‘-‘ of module

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
    }
  }
}

Additional Information

Weight5 g

Reviews

There are no reviews yet.

Be the first to review “KY-006 Small Passive Buzzer”

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