Buzzer Melody with Pushbutton and Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 พ.ย. 2016
  • With this tutorial, we will be able to hear the melody when the button is pressed. Play a Melody using the tone() function
    Required Hardware
    Arduino Board: amzn.to/2LZr6t4
    Buzzer: amzn.to/3ud2PkF
    Push Button: amzn.to/3k79Bnh
    10K Resistor: amzn.to/3bj2HY9
    Jumper Wires: amzn.to/3doetmT
    Breadboard: amzn.to/3qxLxwm
    Recommended Items:
    Use Your Muscles in Project - amzn.to/3wdL45C
    37 Sensor & Module Packages - amzn.to/3m66WeQ
    Try this Robot Arm - amzn.to/3fq8DCl
    Best Resin 3D Printer - amzn.to/39tY8KB
    Arduino Compatible Kits - bit.ly/2J2AFF7
    Banggood Spring Sale - bit.ly/3slMbOn
    Source Code: create.arduino.cc/editor/mert...
    Social Media:
    / mertarduino
    / mertarduino
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 123

  • @maker101io
    @maker101io  3 ปีที่แล้ว +3

    Source Code: create.arduino.cc/editor/mertarduinotech/231ec5d6-2bd9-4a36-8497-683d14f3dbc6/preview
    Recommended Items:
    Use Your Muscles in Project - amzn.to/3wdL45C​
    37 Sensor & Module Packages - amzn.to/3m66WeQ​
    Try this Robot Arm - amzn.to/3fq8DCl​
    Best Resin 3D Printer - amzn.to/39tY8KB​
    Arduino Compatible Kits - bit.ly/2J2AFF7​
    Banggood Spring Sale - bit.ly/3slMbOn

  • @myukke6105
    @myukke6105 4 ปีที่แล้ว +2

    THANK YOU SO MUCH, I DID A LAST MINUTE PROJECT AND IT ACTUALLY WORKED. Instant sub and like, your vids are actually understandable unlike our teacher

  • @FDCAFOK
    @FDCAFOK 4 ปีที่แล้ว

    This is exactly what I needed.
    This is something I want to do for Christmas decorations project but with a speaker.
    Thank you for the video.

  • @nickthewinner2194
    @nickthewinner2194 5 ปีที่แล้ว

    SUCCESS! Keep prospering and living abundantly mann

  • @BiscuitDev
    @BiscuitDev 7 ปีที่แล้ว

    FINALLY, what I was looking for. All the other tutorials have a buzzer with a circuit.

  • @danya8958
    @danya8958 6 ปีที่แล้ว

    *LOL YOU ARE THE BEST YOUR PROJECTS NEVER FAIL AND ARE SO INTERESTING THANK YOU*
    Just a question: can I play complete songs with this like the super mario theme or another?

  • @ev2driver
    @ev2driver 7 ปีที่แล้ว

    Very Good!. It saved me a lot of time. Thank you

  • @zanapa9585
    @zanapa9585 6 ปีที่แล้ว

    Mert çok teşekkürler sayende yaptım fakat başka melodiler de yapmak istiyorum biraz bilgi verebilir misin?bu arada video çok iyi!

  • @gulfsurfco
    @gulfsurfco 6 ปีที่แล้ว

    Yaaaaaaa! I did it and it worked! You went so fast at the end where you created a new tab for the note library I almost missed it. Anyways, very cool and thanks for the tutorial :)

  • @samarMessoud
    @samarMessoud 4 ปีที่แล้ว +2

    THANKS OR THIS VIDEO BUT I HAVE A QUESTION I WANT TO ADD ATHOR MELODY HOW I CAN DECODED

  • @ansumanpanda497
    @ansumanpanda497 7 ปีที่แล้ว +1

    sir will u please make a video on PWM pins and there working..

  • @saifthepenguin651
    @saifthepenguin651 2 ปีที่แล้ว

    nice tuto for beginner

  • @myrabohmer2077
    @myrabohmer2077 10 หลายเดือนก่อน

    Thank you for the tutorial, it helped get me a step closer to where I need to be. The button on my breadboard does nothing the melody will play by itself without me pressing the button. I can't turn the button 90 degrees as it won't fit. Any suggestions on what to change? I'm a very new beginner so if possible step-by-step🙂

  • @realtrickybilly
    @realtrickybilly 6 ปีที่แล้ว

    Thank you it has worked

  • @user-tk5hh1si1k
    @user-tk5hh1si1k 7 หลายเดือนก่อน

    Do you have tutorial where you use a button to turn an LED and a buzzer on?

  • @kennethpiguez1685
    @kennethpiguez1685 2 ปีที่แล้ว

    I love the background music tho, it makes me dance

  • @simonbihais2967
    @simonbihais2967 7 ปีที่แล้ว +1

    YOUR ARE THE BESTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT !!!!!!!!!!!!!!!!!!!

  • @Ice-Qube
    @Ice-Qube 5 ปีที่แล้ว

    Hey I'am new to Aduinos and all of that.
    Why did he make a knot into the wire to the Audino?
    Is there a particular reason?

    • @brunsniggel
      @brunsniggel 5 ปีที่แล้ว +2

      No. Only to shorten the wire for aestethics i assume. It has no effect

  • @NPG97
    @NPG97 7 ปีที่แล้ว

    did you use a library?

  • @GeorgeDumitra
    @GeorgeDumitra 7 ปีที่แล้ว

    I think you've used an active buzzer instead of passive. Right? The sound shall be better into an passive buzzer (of course depends on the resonance frequncy range of it).

  • @user-sm4ns3rb7s
    @user-sm4ns3rb7s 6 ปีที่แล้ว

    I want to know the name of the music from the video

  • @prmryday
    @prmryday 6 ปีที่แล้ว

    thankyou it work

  • @anthonyinabo2382
    @anthonyinabo2382 3 ปีที่แล้ว +1

    thx alot

  • @totoverde8449
    @totoverde8449 7 ปีที่แล้ว

    thank you :)

  • @billsteiner625
    @billsteiner625 7 ปีที่แล้ว

    do you have a link for the code for a copy paste?

  • @user-nn8ft2yn5w
    @user-nn8ft2yn5w 2 หลายเดือนก่อน

    Thank it works 😃

  • @jaspervanzeir1714
    @jaspervanzeir1714 6 ปีที่แล้ว

    Thanks you

  • @ruhsuzat9291
    @ruhsuzat9291 6 ปีที่แล้ว +1

    abi ben hoparlör bağlasam müzik çaldırabilirmiyim acaba ?

  • @ragames7426
    @ragames7426 4 ปีที่แล้ว

    thank, It's work

  • @MrJefferson105
    @MrJefferson105 7 ปีที่แล้ว

    Where did you get the music ?

  • @jsebas2546
    @jsebas2546 6 ปีที่แล้ว +2

    Buen video

  • @any123-og
    @any123-og 5 ปีที่แล้ว +2

    Will using a passive buzzer make the sound quality better

  • @tny9970
    @tny9970 3 ปีที่แล้ว

    Benim buzzerımdan ses cızırtılı geliyor nasıl düzelir acil yanıtlarsan sevinirim

  • @cemilozbek7643
    @cemilozbek7643 7 ปีที่แล้ว

    HOCAM FARKLI MELODİ KODLARI NEREDE BULABİLİRİM ?

  • @GamerVadim
    @GamerVadim 6 ปีที่แล้ว

    i did all what is is this video and put all codes correct but don't working WHY ?

  • @ceylontechshow4393
    @ceylontechshow4393 6 ปีที่แล้ว

    Super bro

  • @codemore8863
    @codemore8863 ปีที่แล้ว

    cox izzah eliyirrrr!!!!!

  • @aaronchay525
    @aaronchay525 6 ปีที่แล้ว +3

    My button basically does nothing, once I plug in the Arduino it automatically starts playing the song. How do I change it so it plays once I press the button? Thanks.

    • @rickmorenojr
      @rickmorenojr 6 ปีที่แล้ว

      The pins on the little pushbutton can be tricky. You may have to rotate your switch 90 degrees, or move your jumpers, so that a different set of pins connect to the Arduino.

  • @codingtimes3199
    @codingtimes3199 7 ปีที่แล้ว

    j'adore

  • @durrium
    @durrium 4 ปีที่แล้ว

    Why is the 10k resistor used with the button? :) thanks!

    • @johnpartridge7052
      @johnpartridge7052 4 ปีที่แล้ว +1

      if it wasn't used the pin would go straight to ground and there will be no "high" and "low"

    • @torenarend
      @torenarend 4 ปีที่แล้ว +1

      Its called a pulldown resistor. Check on that.

  • @perinbanmohanraj9145
    @perinbanmohanraj9145 2 ปีที่แล้ว

    please help which library do i want to download to get pitches.h

    • @ioanaadelinasandru2877
      @ioanaadelinasandru2877 ปีที่แล้ว

      In Arduino u have to make a new tab and name it pitches.h and in that tab add the code for different notes

  • @pantacosplay
    @pantacosplay 6 ปีที่แล้ว

    How to make the iron man laser sound with this tutorial?

  • @pawelkaborodo1502
    @pawelkaborodo1502 7 ปีที่แล้ว

    How many notes can I play?

  • @Zencsy
    @Zencsy 6 ปีที่แล้ว +1

    hey, try to make a remote control drone!

  • @ahmadtuflihun6924
    @ahmadtuflihun6924 7 ปีที่แล้ว

    That's active buzzer right?

  • @halomoonz
    @halomoonz 3 ปีที่แล้ว

    expected primary-expression before 'int'
    it gave this error

  • @ameydamle9918
    @ameydamle9918 6 ปีที่แล้ว

    not able to install library

  • @umutenzerturkmen7096
    @umutenzerturkmen7096 5 ปีที่แล้ว +4

    saol kardeş

  • @enisekara9008
    @enisekara9008 6 ปีที่แล้ว +1

    Buton kullanmasak devrede yine çalışır mı ?

    • @ruhsuzat9291
      @ruhsuzat9291 6 ปีที่แล้ว

      kodları değiştirirsen çalışır

  • @JJ-gy1yr
    @JJ-gy1yr 4 ปีที่แล้ว +1

    Can someone tell me please what is the name of this song?

    • @KevinKreger
      @KevinKreger 4 ปีที่แล้ว +1

      "Shave and a haircut, two bits"
      That's the phrase that was sung, not sure of the exact song, but I think English early 20th century.

  • @rimson3274
    @rimson3274 5 ปีที่แล้ว +1

    I listen this song on buzzer

  • @leonardoscrivere7297
    @leonardoscrivere7297 7 ปีที่แล้ว

    i love you

  • @kvlpnd
    @kvlpnd 7 ปีที่แล้ว

    Nice idea. Now I am thinking to extend it to multi tone project. (y)

  • @patrickwang6747
    @patrickwang6747 5 ปีที่แล้ว

    how do i do it with two button? like i cant seem to figure it out?

    • @emmamakesbadart
      @emmamakesbadart 5 ปีที่แล้ว +1

      Like two buttons needed to activate the speaker? Then you have to first make an second thing called buttonState2 & make the part that says buttonState == 1 into buttonState == 1 && buttonState2 == 1 that way the speaker can only go off when both buttons are pressed. I hope this helps! I am doing a similar project where three buttons need to be pressed to activate a speaker

    • @Tom-yl6fp
      @Tom-yl6fp 5 ปีที่แล้ว

      Emma Roe can you help me out with this I’m trying to do the same thing

    • @patrickwang6747
      @patrickwang6747 4 ปีที่แล้ว +1

      @@Tom-yl6fp BROOOOOOOO
      I GOT IT MAN DO TWO IFSTATEMENT BROOOOOOOOOOOOOOOOOOOOOO

  • @nu8nas667
    @nu8nas667 4 ปีที่แล้ว +1

    button yerine potansiyometre kullansak olurmu

    • @montajnite3594
      @montajnite3594 4 ปีที่แล้ว

      kardeşim tam bilmiyorum ama sanırım olmaz

    • @nu8nas667
      @nu8nas667 4 ปีที่แล้ว

      @@montajnite3594 tşk cevap için

  • @luthfin5562
    @luthfin5562 6 ปีที่แล้ว

    well, the buzzer works, but i only get a high pitch sound, no song. can anyone help?

    • @holygodify
      @holygodify 4 ปีที่แล้ว

      try using a passive buzzer the quality of the sound is better might be that ur buzzer is not clear

  • @ozanturgut1489
    @ozanturgut1489 6 ปีที่แล้ว +1

    aktif buzzer mı yoksa pasif buzzer mı ?
    farkı varmı

  • @techinteractive
    @techinteractive ปีที่แล้ว +3

    I cannot get the code of pitches.h somebody please help

    • @madhavverma4613
      @madhavverma4613 หลายเดือนก่อน

      yes bro it is same in me

  • @buraktekkas9576
    @buraktekkas9576 6 ปีที่แล้ว

    kendi melodimizi yazmayı öğretebilir misin ?

  • @ahmadtuflihun6924
    @ahmadtuflihun6924 7 ปีที่แล้ว

    Bagus, videonya :3

  • @sakallhyargt8410
    @sakallhyargt8410 4 ปีที่แล้ว +2

    Get Code’a tıkladım ama
    “404 NOT FOUND”
    nginx
    Yazısı çıktı

  • @Hetaa
    @Hetaa 4 ปีที่แล้ว +1

    anyone have the full source code?

  • @juwairiabadawi7959
    @juwairiabadawi7959 4 ปีที่แล้ว

    how can i make it louder?

    • @rejoentwm6398
      @rejoentwm6398 3 ปีที่แล้ว +2

      lower the resistance maybe idk

  • @williammichael3913
    @williammichael3913 6 ปีที่แล้ว

    How do you save the pitches.h? SOmeone please anwser me

    • @enteresearch
      @enteresearch 5 ปีที่แล้ว

      use example from arduino. use tone :D

  • @Anton-sz6ef
    @Anton-sz6ef 5 ปีที่แล้ว +1

    Since now I've been using the buzzer in such a wrong way..

  • @elsayedreda1091
    @elsayedreda1091 6 ปีที่แล้ว

    Code please

  • @grom9627
    @grom9627 5 ปีที่แล้ว +1

    Why 10K resistor?

    • @EXMattix
      @EXMattix 4 ปีที่แล้ว

      It's a pull down, you can set a higher one to lower the current about it.

  • @orlandolopez7815
    @orlandolopez7815 6 ปีที่แล้ว +1

    as una musica completa

  • @Cat_KH1
    @Cat_KH1 4 ปีที่แล้ว +3

    what if leds were added?

    • @Tokabokacilek
      @Tokabokacilek 3 ปีที่แล้ว

      Keirsten Camp detach them after than put them again

  • @ebrahimmomin7518
    @ebrahimmomin7518 2 ปีที่แล้ว +4

    why is ur button so damn big?

  • @przemekbundy
    @przemekbundy 5 ปีที่แล้ว +1

    po co pisac skech recznie. skoro jest on w przykladach arduino. nie lepiej byc kreatywnym i samemu cos napisac.

  • @fucjk2141
    @fucjk2141 4 ปีที่แล้ว +5

    Does not work. did the exact same thing you did

  • @joserosendosotoreza101
    @joserosendosotoreza101 6 ปีที่แล้ว +1

    La tuya en vinagre

  • @meyogeshjangra
    @meyogeshjangra 6 ปีที่แล้ว

    Who is father in the video.

  • @ruthw.3571
    @ruthw.3571 6 ปีที่แล้ว

    hello how to play an other song

    • @zanapa9585
      @zanapa9585 6 ปีที่แล้ว

      yes pls answer !

    • @smba1572
      @smba1572 5 ปีที่แล้ว

      Do u know how

    • @subramonianiyer9010
      @subramonianiyer9010 4 ปีที่แล้ว

      You have to code each note of the song using tone() and delay(). Then replace the tone() part of the original program with the new one and then upload it to the Arduino/Genuino.

  • @evanmedeiros6930
    @evanmedeiros6930 6 ปีที่แล้ว

    Anyone know where to find the code

  • @eymenturkmen24
    @eymenturkmen24 7 ปีที่แล้ว

    Abi Kod yanlış galiba olmuyor

    • @eymenturkmen24
      @eymenturkmen24 7 ปีที่แล้ว

      Mert Arduino Tutorial & Projects Abi ekledim ama yinede olmuyor

    • @eymenturkmen24
      @eymenturkmen24 7 ปีที่แล้ว

      sketch_jan14a:31: error: expected ';' before numeric constant
      for (int thisNote=0; thisNote
      ^
      sketch_jan14a:31: error: lvalue required as left operand of assignment
      for (int thisNote=0; thisNote
      ^
      sketch_jan14a:31: error: expected ')' before 'a'
      for (int thisNote=0; thisNote
      ^
      sketch_jan14a:31: error: 'a' was not declared in this scope
      sketch_jan14a:31: error: expected '}' at end of input
      for (int thisNote=0; thisNote
      ^
      sketch_jan14a:31: error: expected '}' at end of input
      exit status 1
      expected ';' before numeric constant
      This report would have more information with
      "Show verbose output during compilation"
      option enabled in File -> Preferences.

    • @eymenturkmen24
      @eymenturkmen24 7 ปีที่แล้ว

      Mert Arduino Tutorial & Projects
      Abi şimdi verdiğin link doğru
      açıklama kısmındakı yanlış

    • @eymenturkmen24
      @eymenturkmen24 7 ปีที่แล้ว

      Mert Arduino Tutorial & Projects
      Çok teşekkür edrim 😊

  • @user-lw6ib3ew2d
    @user-lw6ib3ew2d 6 ปีที่แล้ว +1

    Mert türkmüsün

  • @louisfushigiii.8967
    @louisfushigiii.8967 3 ปีที่แล้ว

    buzzerla mehter marşı çalmayan da ne biliyim yani xD

  • @ruthw.3571
    @ruthw.3571 6 ปีที่แล้ว

    please reply

  • @cigoli3542
    @cigoli3542 4 ปีที่แล้ว +1

    Kodu almış kopyalamışsın bir yerden üzerine video çekmişsin

    • @burakerengokay
      @burakerengokay 3 ปีที่แล้ว

      Kardeşim onlar ardunionun nota tanımlamaları

  • @benkiben
    @benkiben 4 ปีที่แล้ว +3

    Is it that you cannot talk or you afraid of talking? Next time you make a video make sure you talk otherwise don't

    • @singaporememorylane
      @singaporememorylane 4 ปีที่แล้ว +14

      who the fuck are you?

    • @Tea-gh8cu
      @Tea-gh8cu 4 ปีที่แล้ว +8

      Don’t tell me that you put the same comment on every video that doesn’t have a voice, so stupid xd

    • @benkiben
      @benkiben 4 ปีที่แล้ว

      If you can't talk simply don't do any videos.

    • @singaporememorylane
      @singaporememorylane 4 ปีที่แล้ว +11

      @@benkiben Fuck off

    • @megamer2340
      @megamer2340 3 ปีที่แล้ว +1

      @@benkiben dude if he doesn’t want to talk then he doesn’t need to

  • @GamerVadim
    @GamerVadim 6 ปีที่แล้ว

    i did all what is is this video and put all codes correct but don't working WHY ?

    • @surfele
      @surfele 4 ปีที่แล้ว +1

      I had the same problem. I solved it correcting the following lines of code:
      [...]
      tone (12, melody [thisNote], noteDuration); // 12 instead of 8
      int pauseBetweenNotes = noteDuration *1.30;
      delay (pauseBetweenNotes);
      noTone(12); // 12 instead of 8
      [...]
      My problem was that the buzzer was initialized for the 12 pin while the code had it written for 8