• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Make Beep Sound in Arduino Project Upon Push Button Press

By Abhishek Ghosh June 2, 2018 12:01 pm Updated on June 2, 2018

Make Beep Sound in Arduino Project Upon Push Button Press

Advertisement

It is Practical For Many Projects Including LED Clocks. We actually expect some visual, auditory feel along with tactile feel. Normally, we create sound on Arduino in complex way as the sounds has lot of pitches. But here, we just need a simple sound, so the circuit and code is easy and ready to be adapted inside other projects. Here is How to Make Beep Sound in Arduino Project Upon Push Button Press.

 

How To Make Beep Sound in Arduino Project Upon Push Button Press

 

In this project, we will make a circuit which will play a sound using a buzzer and an LED which sound and as example of a complex project, it will light up LED when a button is pressed. For this project, we need :

Arduino UNO or similar board
Piezo Buzzer – One
LED – One
220 Ohm Resistor – One
10K Ohm Resistor – One
Pushbutton – One
Breadboard – One
Jumper Wires – Few

Advertisement

---

The circuit itself quite simple circuit to set up. Be careful with the positive and negative poles of piezo buzzer :

Make Beep Sound in Arduino Project Upon Push Button Press

Arduino has documentation on Tone :

Vim
1
https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/

And slightly complex example of simple keyboard using the tone() function :

Vim
1
Simple keyboard using the tone() function

For our need, here is the code :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
int buzzerPin = 9;
int buttonPin = 7;
int ledPin = 6;
const int toneFreq = 523;
 
void setup()
{
  pinMode(buzzerPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(buttonPin, INPUT);
}
 
void loop()
{
  int buttonState = digitalRead(buttonPin);
  if (buttonState==LOW)
  {
    digitalWrite(ledPin, HIGH);
    tone(buzzerPin, toneFreq);
  }
  else
  {
    digitalWrite(ledPin, LOW);
    noTone(buzzerPin);
  }
}

Some years back, I kept the schematic and code (as text file) inside a directory for future in need of my project. I actually not thought of sharing it at that time. I am not sure who actually written the code. Although a small snippet is not huge matter, yet it is correct to give the reference of the person who gave some time behind it to find out. Which unfortunately I can not do now.

Tagged With Arduino beep , how to make a button make a sound on arduino , how to make buzzers go on once button is pressed in arduino , button pressed make sound arduino , https://thecustomizewindows com/2018/06/make-beep-sound-in-arduino-project-when-a-push-button-is-pressed/ , How to make Arduino beep , how to make a buzzer beep when button is pushed arduino , something that make sound when press button , arduino button Klick beep , arduino beep sound
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Make Beep Sound in Arduino Project Upon Push Button Press

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Arduino : Blink LED and Beep Every X Seconds Upon Push Button Press

    Previously we have shown beep with key press and LED lightening up and projects like Arduino Traffic Light, Arduino TM1637 with RTC. Here is How To Blink LED and Beep Every 1 Second With Arduino Upon Push Button Press. We Will Discuss Many Ways To Achieve The Goal Including Using RTC. Arduino has many ways […]

  • Arduino Blink LED Rate Depending On Push Button Press Duration

    We Can Use millis() To Perform Many Things. Here is Arduino Blink LED Rate Depending On Push Button Press Duration Guide With Circuit and Code.

  • Blink LED and Beep Every 1 Second With Arduino

    Here is How To Blink LED and Beep Every 1 Second With Arduino. We Will Discuss Many Ways To Achieve The Goal Including Using RTC.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy