Buzzer Melody with Pushbutton and Arduino

Поделиться
HTML-код
  • Опубликовано: 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.

  • @ev2driver
    @ev2driver 7 лет назад

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

  • @realtrickybilly
    @realtrickybilly 7 лет назад

    Thank you it has worked

  • @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?

  • @ansumanpanda497
    @ansumanpanda497 7 лет назад +1

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

  • @gulfsurfco
    @gulfsurfco 7 лет назад

    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 :)

  • @saifthepenguin651
    @saifthepenguin651 2 года назад

    nice tuto for beginner

  • @kennethpiguez1685
    @kennethpiguez1685 2 года назад

    I love the background music tho, it makes me dance

  • @user-tk5hh1si1k
    @user-tk5hh1si1k 8 месяцев назад

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

  • @myrabohmer2077
    @myrabohmer2077 11 месяцев назад

    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🙂

  • @samarMessoud
    @samarMessoud 4 года назад +2

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

  • @jaspervanzeir1714
    @jaspervanzeir1714 6 лет назад

    Thanks you

  • @prmryday
    @prmryday 6 лет назад

    thankyou it work

  • @anthonyinabo2382
    @anthonyinabo2382 3 года назад +1

    thx alot

  • @totoverde8449
    @totoverde8449 7 лет назад

    thank you :)

  • @user-nn8ft2yn5w
    @user-nn8ft2yn5w 3 месяца назад

    Thank it works 😃

  • @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!

  • @TTOBE3ET_3ABTPA
    @TTOBE3ET_3ABTPA 6 лет назад

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

  • @pantacosplay
    @pantacosplay 6 лет назад

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

  • @simonbihais2967
    @simonbihais2967 7 лет назад +1

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

  • @Ice-Qube
    @Ice-Qube 6 лет назад

    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 6 лет назад +2

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

  • @ragames7426
    @ragames7426 4 года назад

    thank, It's work

  • @MrJefferson105
    @MrJefferson105 7 лет назад

    Where did you get the music ?

  • @ruhsuzat9291
    @ruhsuzat9291 6 лет назад +1

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

  • @jsebas2546
    @jsebas2546 6 лет назад +2

    Buen video

  • @billsteiner625
    @billsteiner625 7 лет назад

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

  • @any123-og
    @any123-og 5 лет назад +2

    Will using a passive buzzer make the sound quality better

  • @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).

  • @ceylontechshow4393
    @ceylontechshow4393 6 лет назад

    Super bro

  • @GamerVadim
    @GamerVadim 6 лет назад

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

  • @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.

  • @pawelkaborodo1502
    @pawelkaborodo1502 7 лет назад

    How many notes can I play?

  • @codingtimes3199
    @codingtimes3199 7 лет назад

    j'adore

  • @codemore8863
    @codemore8863 Год назад

    cox izzah eliyirrrr!!!!!

  • @tny9970
    @tny9970 3 года назад

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

  • @ameydamle9918
    @ameydamle9918 6 лет назад

    not able to install library

  • @perinbanmohanraj9145
    @perinbanmohanraj9145 2 года назад

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

    • @Nin77731
      @Nin77731 2 года назад

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

  • @halomoonz
    @halomoonz 3 года назад

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

  • @Zencsy
    @Zencsy 6 лет назад +1

    hey, try to make a remote control drone!

  • @umutenzerturkmen7096
    @umutenzerturkmen7096 5 лет назад +4

    saol kardeş

  • @ahmadtuflihun6924
    @ahmadtuflihun6924 7 лет назад

    That's active buzzer right?

  • @rimson3274
    @rimson3274 5 лет назад +1

    I listen this song on buzzer

  • @cemilozbek7643
    @cemilozbek7643 7 лет назад

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

  • @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.

  • @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.

  • @orlandolopez7815
    @orlandolopez7815 6 лет назад +1

    as una musica completa

  • @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

  • @enisekara9008
    @enisekara9008 6 лет назад +1

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

    • @ruhsuzat9291
      @ruhsuzat9291 6 лет назад

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

  • @techinteractive
    @techinteractive Год назад +3

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

  • @elsayedreda1091
    @elsayedreda1091 6 лет назад

    Code please

  • @buraktekkas9576
    @buraktekkas9576 6 лет назад

    kendi melodimizi yazmayı öğretebilir misin ?

  • @Hetaa
    @Hetaa 4 года назад +1

    anyone have the full source code?

  • @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 5 лет назад +1

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

  • @juwairiabadawi7959
    @juwairiabadawi7959 4 года назад

    how can i make it louder?

    • @rejoentwm6398
      @rejoentwm6398 3 года назад +2

      lower the resistance maybe idk

  • @nu8nas667
    @nu8nas667 5 лет назад +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

  • @leonardoscrivere7297
    @leonardoscrivere7297 7 лет назад

    i love you

  • @ahmadtuflihun6924
    @ahmadtuflihun6924 7 лет назад

    Bagus, videonya :3

  • @ozanturgut1489
    @ozanturgut1489 6 лет назад +1

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

  • @kvlpnd
    @kvlpnd 7 лет назад

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

  • @fucjk2141
    @fucjk2141 5 лет назад +5

    Does not work. did the exact same thing you did

  • @sakallhyargt8410
    @sakallhyargt8410 4 года назад +2

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

  • @grom9627
    @grom9627 5 лет назад +1

    Why 10K resistor?

    • @EXMattix
      @EXMattix 5 лет назад

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

  • @ebrahimmomin7518
    @ebrahimmomin7518 3 года назад +5

    why is ur button so damn big?

  • @Cat_KH1
    @Cat_KH1 4 года назад +3

    what if leds were added?

    • @Tokabokacilek
      @Tokabokacilek 4 года назад

      Keirsten Camp detach them after than put them again

  • @Anton-sz6ef
    @Anton-sz6ef 5 лет назад +1

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

  • @williammichael3913
    @williammichael3913 6 лет назад

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

    • @enteresearch
      @enteresearch 6 лет назад

      use example from arduino. use tone :D

  • @meyogeshjangra
    @meyogeshjangra 6 лет назад

    Who is father in the video.

  • @przemekbundy
    @przemekbundy 5 лет назад +1

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

  • @joserosendosotoreza101
    @joserosendosotoreza101 7 лет назад +1

    La tuya en vinagre

  • @evanmedeiros6930
    @evanmedeiros6930 6 лет назад

    Anyone know where to find the code

  • @user-lw6ib3ew2d
    @user-lw6ib3ew2d 6 лет назад +1

    Mert türkmüsün

  • @ruthw.3571
    @ruthw.3571 7 лет назад

    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.

  • @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 😊

  • @ruthw.3571
    @ruthw.3571 7 лет назад

    please reply

  • @louisfushigiii.8967
    @louisfushigiii.8967 3 года назад

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

  • @cigoli3542
    @cigoli3542 4 года назад +1

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

    • @burakerengokay
      @burakerengokay 4 года назад

      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