SlideShare a Scribd company logo
BUZZER
• Piezo buzzer is an electronic device commonly used to
produce sound.
• Light weight, simple construction and low price make
it usable in various applications like car/truck reversing
indicator, computers, call bells etc.
• Piezo buzzer is based on the inverse principle of piezo
electricity . It is the phenomena of generating
electricity when mechanical pressure is applied to
certain materials and the vice versa is also true. Such
materials are called piezo electric materials.
• Piezo electric materials are either naturally available or
manmade. Piezoceramic is class of manmade material,
which poses piezo electric effect and is widely used to
make disc, the heart of piezo buzzer. When subjected
to an alternating electric field they stretch or
compress, in accordance with the frequency of the
signal thereby producing sound.
CODE
const int buzzer = 9; //buzzer to arduino pin 9
void setup()
{
pinMode(buzzer, OUTPUT); // initializing pin 9 as an output
}
void loop()
{
digitalWrite(buzzer, HIGH); // (HIGH )
delay(1000); // wait for a second
digitalWrite(buzzer, LOW); // LOW
delay(1000); // wait for a second
}
int ledPin = 13;
int knockSensor = A0;
byte val = 0;
int statePin = LOW;
int THRESHOLD = 70;
void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
val = analogRead(knockSensor);
if (val >= THRESHOLD) {
statePin = !statePin;
digitalWrite(ledPin, statePin);
Serial.println("Knock!");
}
delay(100); // we have to make a delay to avoid overloading
}
KNOCK

More Related Content

What's hot

Heart beat detector using arduino
Heart beat detector using arduinoHeart beat detector using arduino
Heart beat detector using arduino
Varshaa Khandagale
 
Lm 35
Lm 35Lm 35
PPT ON Arduino
PPT ON Arduino PPT ON Arduino
PPT ON Arduino
Ravi Phadtare
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Green Moon Solutions
 
Different Arduino Boards
Different Arduino BoardsDifferent Arduino Boards
Different Arduino Boards
Mitwa Palkhiwala
 
Sensor technology
Sensor technologySensor technology
Sensor technology
Rahul Baghla
 
Radar system using arduino
Radar system using arduinoRadar system using arduino
Radar system using arduino
Faisal Kabir
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessor
sobhadevi
 
Ultrasonic sensor
Ultrasonic sensorUltrasonic sensor
Ultrasonic sensor
Adarsh Raj
 
PROJECT REPORT ON Home automation using by Bluetooth
 PROJECT REPORT ON Home automation using by Bluetooth PROJECT REPORT ON Home automation using by Bluetooth
PROJECT REPORT ON Home automation using by Bluetooth
Aakashkumar276
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and Programming
Emmanuel Obot
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
avikdhupar
 
1. Introduction to Embedded Systems & IoT
1. Introduction to Embedded Systems & IoT1. Introduction to Embedded Systems & IoT
1. Introduction to Embedded Systems & IoT
IEEE MIU SB
 
Seven Segment Display
Seven Segment DisplaySeven Segment Display
Seven Segment Display
Kshitij Wagle
 
Seminar on night vision technology ppt
Seminar on night vision technology pptSeminar on night vision technology ppt
Seminar on night vision technology ppt
deepakmarndi
 
Arduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoArduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the Arduino
Eoin Brazil
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
Michal Sedlak
 
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriArduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Gaurav Pandey
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Yong Heui Cho
 

What's hot (20)

Heart beat detector using arduino
Heart beat detector using arduinoHeart beat detector using arduino
Heart beat detector using arduino
 
Lm 35
Lm 35Lm 35
Lm 35
 
PPT ON Arduino
PPT ON Arduino PPT ON Arduino
PPT ON Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Different Arduino Boards
Different Arduino BoardsDifferent Arduino Boards
Different Arduino Boards
 
Sensor technology
Sensor technologySensor technology
Sensor technology
 
Radar system using arduino
Radar system using arduinoRadar system using arduino
Radar system using arduino
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessor
 
Ultrasonic sensor
Ultrasonic sensorUltrasonic sensor
Ultrasonic sensor
 
PROJECT REPORT ON Home automation using by Bluetooth
 PROJECT REPORT ON Home automation using by Bluetooth PROJECT REPORT ON Home automation using by Bluetooth
PROJECT REPORT ON Home automation using by Bluetooth
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and Programming
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
 
1. Introduction to Embedded Systems & IoT
1. Introduction to Embedded Systems & IoT1. Introduction to Embedded Systems & IoT
1. Introduction to Embedded Systems & IoT
 
Seven Segment Display
Seven Segment DisplaySeven Segment Display
Seven Segment Display
 
Seminar on night vision technology ppt
Seminar on night vision technology pptSeminar on night vision technology ppt
Seminar on night vision technology ppt
 
Arduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoArduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the Arduino
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
 
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriArduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 

Viewers also liked

Interfacing bluetooth with arduino
Interfacing bluetooth with arduinoInterfacing bluetooth with arduino
Interfacing bluetooth with arduino
Jairaj Jangle
 
Interfacing keypad
Interfacing keypadInterfacing keypad
Interfacing keypadPRADEEP
 
Arduino lcd display
Arduino lcd displayArduino lcd display
Arduino lcd display
Makers of India
 
Arduino uno lcd display 16x2
Arduino uno lcd display 16x2Arduino uno lcd display 16x2
Arduino uno lcd display 16x2
Robomart India
 
Lcd with arduino uno
Lcd with arduino unoLcd with arduino uno
Lcd with arduino uno
Robomart India
 
Liquid Crystal Display (LCD)
Liquid Crystal Display (LCD)Liquid Crystal Display (LCD)
Liquid Crystal Display (LCD)
Bhaskar Jyoti Sarma
 
Bluetooth Module HC-06
Bluetooth Module HC-06Bluetooth Module HC-06
Bluetooth Module HC-06
Raghav Shetty
 
Bluetooth Module
Bluetooth ModuleBluetooth Module
Bluetooth Module
Mohsen Sarakbi
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
Pantech ProLabs India Pvt Ltd
 
LinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedLinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-Presented
SlideShare
 
Top 5 Deep Learning and AI Stories - October 6, 2017
Top 5 Deep Learning and AI Stories - October 6, 2017Top 5 Deep Learning and AI Stories - October 6, 2017
Top 5 Deep Learning and AI Stories - October 6, 2017
NVIDIA
 

Viewers also liked (11)

Interfacing bluetooth with arduino
Interfacing bluetooth with arduinoInterfacing bluetooth with arduino
Interfacing bluetooth with arduino
 
Interfacing keypad
Interfacing keypadInterfacing keypad
Interfacing keypad
 
Arduino lcd display
Arduino lcd displayArduino lcd display
Arduino lcd display
 
Arduino uno lcd display 16x2
Arduino uno lcd display 16x2Arduino uno lcd display 16x2
Arduino uno lcd display 16x2
 
Lcd with arduino uno
Lcd with arduino unoLcd with arduino uno
Lcd with arduino uno
 
Liquid Crystal Display (LCD)
Liquid Crystal Display (LCD)Liquid Crystal Display (LCD)
Liquid Crystal Display (LCD)
 
Bluetooth Module HC-06
Bluetooth Module HC-06Bluetooth Module HC-06
Bluetooth Module HC-06
 
Bluetooth Module
Bluetooth ModuleBluetooth Module
Bluetooth Module
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
 
LinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedLinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-Presented
 
Top 5 Deep Learning and AI Stories - October 6, 2017
Top 5 Deep Learning and AI Stories - October 6, 2017Top 5 Deep Learning and AI Stories - October 6, 2017
Top 5 Deep Learning and AI Stories - October 6, 2017
 

More from Makers of India

push button with led matrix
push button with led matrixpush button with led matrix
push button with led matrix
Makers of India
 
Rgb
RgbRgb
Integrated development environment
Integrated development environmentIntegrated development environment
Integrated development environment
Makers of India
 
Introduction to arduino!
Introduction to arduino!Introduction to arduino!
Introduction to arduino!
Makers of India
 
Programming with arduino
Programming with arduinoProgramming with arduino
Programming with arduino
Makers of India
 
Led fade
Led  fadeLed  fade
Led fade
Makers of India
 

More from Makers of India (6)

push button with led matrix
push button with led matrixpush button with led matrix
push button with led matrix
 
Rgb
RgbRgb
Rgb
 
Integrated development environment
Integrated development environmentIntegrated development environment
Integrated development environment
 
Introduction to arduino!
Introduction to arduino!Introduction to arduino!
Introduction to arduino!
 
Programming with arduino
Programming with arduinoProgramming with arduino
Programming with arduino
 
Led fade
Led  fadeLed  fade
Led fade
 

Recently uploaded

ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 

Recently uploaded (20)

ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 

Buzzer

  • 2. • Piezo buzzer is an electronic device commonly used to produce sound. • Light weight, simple construction and low price make it usable in various applications like car/truck reversing indicator, computers, call bells etc. • Piezo buzzer is based on the inverse principle of piezo electricity . It is the phenomena of generating electricity when mechanical pressure is applied to certain materials and the vice versa is also true. Such materials are called piezo electric materials. • Piezo electric materials are either naturally available or manmade. Piezoceramic is class of manmade material, which poses piezo electric effect and is widely used to make disc, the heart of piezo buzzer. When subjected to an alternating electric field they stretch or compress, in accordance with the frequency of the signal thereby producing sound.
  • 3.
  • 4. CODE const int buzzer = 9; //buzzer to arduino pin 9 void setup() { pinMode(buzzer, OUTPUT); // initializing pin 9 as an output } void loop() { digitalWrite(buzzer, HIGH); // (HIGH ) delay(1000); // wait for a second digitalWrite(buzzer, LOW); // LOW delay(1000); // wait for a second }
  • 5. int ledPin = 13; int knockSensor = A0; byte val = 0; int statePin = LOW; int THRESHOLD = 70; void setup() { pinMode(ledPin, OUTPUT); Serial.begin(9600); } void loop() { val = analogRead(knockSensor); if (val >= THRESHOLD) { statePin = !statePin; digitalWrite(ledPin, statePin); Serial.println("Knock!"); } delay(100); // we have to make a delay to avoid overloading } KNOCK