KRIVANJADIYables
Published © GPL3+

Working with Piezo

This project demonstrates working with piezos and Arduino.

BeginnerProtip5,931
Working with Piezo

Things used in this project

Story

Read more

Schematics

Breadboard Diagram

Make the connections as shown in the figure above.

Piezo: J15 and J20 (breadboard)
LED: Anode and Cathode to g20 and g19 respectively on the Breadboard.
Resistor: f19 and d19 on the breadboard.
Jumper wire (red): connecting the PIN3 (of Arduino) and f20 (of breadboard)
Jumper wire (black): connecting the GND (of breadboard) and -ve (of breadboard)
Jumper wire (black): connecting f15 (of breadboard) and -ve (of breadboard)
Jumper wire (black): connecting b19 (of breadboard) and -ve (of breadboard)

Code

Working with Piezo

Arduino
const int buzzer = 3;

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

void loop()
{
  digitalWrite(buzzer, HIGH);
  delay(200);
  digitalWrite(buzzer, LOW);
  delay(200);
}

Credits

KRIVANJA

KRIVANJA

37 projects • 52 followers
www.krivanja.dev
DIYables

DIYables

0 projects • 77 followers
I would like to invite you to join and add your projects to DIYables platform https://www.hackster.io/diyables

Comments