Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
stannano
Published © Apache-2.0

How to use, KY-012 [active buzzer]

Learn how to use the KY-012 module in seconds!

BeginnerProtip2,702
How to use, KY-012 [active buzzer]

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
KY-012
×1

Hand tools and fabrication machines

Premium Female/Male Extension Jumper Wires, 40 x 6" (150mm)
Premium Female/Male Extension Jumper Wires, 40 x 6" (150mm)

Story

Read more

Schematics

download_jbSdDgJVKG.png

Code

Untitled file

Arduino
int buzzerPin = 8;

void setup ()
{
  pinMode (buzzerPin, OUTPUT);
}

void loop ()
{
  digitalWrite (buzzerPin, HIGH);
  delay (500);
  digitalWrite (buzzerPin, LOW);
  delay (500);
}

//to use ky-012

Credits

stannano
5 projects • 3 followers
Contact

Comments

Please log in or sign up to comment.