Arduino Tutorial: Learn how to play sound with Arduino by building a DIY Micro Piano. Easy Project

Поделиться
HTML-код
  • Опубликовано: 17 июн 2016
  • In this video we are going to learn how to make sound with Arduino. We are going to build a simple Micro Piano in order to demonstrate the capabilities of the tone function. Let's start!
    Playing back sound is great for adding audio feedback to our projects. So far we were using displays or LEDs in order to provide feedback to the user of the project. Today we will learn how to make sound with Arduino and as you are going to find out, it is very easy.
    💻 Code & Parts: educ8s.tv/arduino-micro-piano/
    Want to learn to code?
    👨‍💻 Check my new RUclips channel: bit.ly/3tku2n0
    🎮 My Android Game: bit.ly/QuizOfKnowledge
  • НаукаНаука

Комментарии • 123

  • @jonvannatto
    @jonvannatto 8 лет назад +1

    Glad you finally got at 3d printer! Truly a great tool!

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

    Mine worked. Very satisfying, lol! I salvage all the parts from old electronics boards. Got the buzzer from a microwave.

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

    So how would I do this, if I wanted to output the sound to a 3/4 inch jack, and use 88 switches instead of 7?

  • @bozhanshang342
    @bozhanshang342 5 лет назад +2

    I have done this project before since I also have the starter kit!

  • @karlng2691
    @karlng2691 8 лет назад +1

    What do you do to upload the code? Do you just transfer the sketch from Notepad ++ to the IDE? What do you do, please help me.

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

    you really helped me bro, thanks!

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

    hey the .cpp in the library its can be open with wordpad and notepad and can edit the file

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

    How do you play two or more notes at the same time ? Tks.

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

    Great video Thanks. Is it possible to modify the volume of tones?
    Regards

  • @wienerschnitzelwienerschni194
    @wienerschnitzelwienerschni194 8 лет назад

    great job have to try this one

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

    This is great. What is the greatest number of sounds that the arduino could play? I am trying to make something that will play around 16 sounds.
    Thank you.

  • @demonslayer3621
    @demonslayer3621 24 дня назад

    how should i save my files in which folder im really new to this

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

    Thanks!!! Work for me

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

    You're great continue like that

  • @Totogita
    @Totogita 8 лет назад +1

    This is a very nice and enticing project. I will put this on my next project. Thank you for posting this instruction.

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

    can somebody help me to fix this error undefined reference to `loop'

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

    Thank you very much :)

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

    great vid thx chief

  • @hicham3341
    @hicham3341 8 лет назад +2

    السلام عليك
    I want to Tighten phone and arduino // USB // Do I need a driver

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

    i tried it but only 6th button is working.What abut remaining?

  • @advadanino8168
    @advadanino8168 Месяц назад

    graet video! can I do it with respberry pi?

  • @KaienSander10Official
    @KaienSander10Official 8 лет назад +1

    How about a video about programming an arduino with a FTDI Breakout?

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

    error compiling this for ardunio uno. plzzzz help

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

    works perfectly

  • @Emike-nc9ew
    @Emike-nc9ew 3 года назад

    Why does the codes change from the notepad to the IDE?..

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

    what is the unit of frequency here??

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

    Hay do you know how to make a floating stone

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

    Can you use a speaker instead of a buzzer?

  • @alpagutsencer
    @alpagutsencer 8 лет назад

    hi man, i want to see preview of the your 3d printer if you want.

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

    Thanks, it works!

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

      Corbos, started ths project yesterday. Should you be able to get a tone when every button is pressed without loading the code? Like in the vid.Just a method to check my wiring.

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

    If i can use a touch switch , then the effect would be more good.

  • @cbm80amiga
    @cbm80amiga 8 лет назад +1

    I don't think you need to use PWM pins for the buzzer. Use just any pin. This library provides square wave using software only.

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

      I'm going to try it... But I think that to talk to the speaker the arduino must make a pwm signal because you can have different frequency.

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

      The instructions in the arduino starter kit said to just connect the push buttons in a resistor ladder to analog pin input 0 (A0.)

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

    I followed your instructions code and schematics but it behave strangely... It keeps looping on one tone without pressing any key

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

    What resistence si that

  • @Apple.Repair
    @Apple.Repair 8 лет назад

    Thank you you have really usefull videos!!

  • @thedankoona_5854
    @thedankoona_5854 8 лет назад

    hey nick! i have an great idea!
    a watersensor +rf wireless module +arduino +relay
    got it already? when the ground is dry the relay goes on, on a distance, wireless!

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

    it just keeps making a noise and the buttons wont do anything

  • @Joelifant
    @Joelifant 8 лет назад

    +1 for the review! :-)

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

    nice video thx

  • @brucewayne-px4lv
    @brucewayne-px4lv 8 лет назад

    excellent.

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

    I always encounter a problem with the "wiring.h". It says it is missing.

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

      I think u have to change it to arduino.h

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

    the code is not opening why

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

    Thank u

  • @Apple.Repair
    @Apple.Repair 8 лет назад

    I want to make a 3 minute timer and once time has arrived, beep to be heard.

  • @abdulkarimhalai6708
    @abdulkarimhalai6708 6 лет назад +3

    What happens when you press two buttons at the same time?

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

      the first button that plays will go, and the second will only play if you stop holding the first one.

  • @karlng2691
    @karlng2691 8 лет назад

    Can you use an active buzzer? What is the different between a buzzer and piezo speaker?

    • @JohnBailey39
      @JohnBailey39 8 лет назад

      A piezo speaker is like a normal speaker, but small, low quality and low volume. You need to play a signal through it. Connecting it to power will just make it click.
      A buzzer has an oscillator built in, so you only need apply electricity to it to get a sound. These can be very loud even with low voltages.

    • @karlng2691
      @karlng2691 8 лет назад

      +John Bailey Which one should I use for this tutorial?

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

    I want its circuit diagram

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

    Circuit diagram??

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

    Hola. Me podrías decir cuáles son las resistencias que necesito. Porque el link está caído;(

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

    cool

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

    Can this work on the raspberry pi model B please?

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

    i have one problem, when i turn on arduino the buzzer started on, and just only one button do something, other 6 button do nothing. i'm so sorry for mistakes, im brazilian!!

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

    I tried doing this code and it only plays one note infinitely.... I followed every step and it still won't work...

  • @squalazzo
    @squalazzo 8 лет назад

    the thingiverse link is missing in description :)

    • @Educ8s
      @Educ8s  8 лет назад +2

      Sorry, fixed!

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

    Buttons 5,6,7 work fine, but 1-4 are silent. Help?

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

      there is no help in this world

  • @julioestevesvaldivieso3521
    @julioestevesvaldivieso3521 7 лет назад +2

    the codes dont work :( i get this error:
    Arduino:1.8.3 (Windows 10), Tarjeta:"Arduino/Genuino Uno"
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer0_pin_port'
    sketch\Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer0_pin_mask'
    sketch\Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer1_pin_port'
    sketch\Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer1_pin_mask'
    sketch\Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer2_pin_port'
    sketch\Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer2_pin_mask'
    sketch\Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer0_toggle_count'
    sketch\Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer1_toggle_count'
    sketch\Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer2_toggle_count'
    sketch\Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `__vector_7'
    sketch\Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    collect2.exe: error: ld returned 1 exit status
    exit status 1
    Error compilando para la tarjeta Arduino/Genuino Uno.
    Este reporte podría tener más información con
    "Mostrar salida detallada durante la compilación"
    opción habilitada en Archivo -> Preferencias.

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

      lol

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

      Tengo el mismo error

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

      Did you ever find the solution?

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

      ¿alguna vez encontraste la solución?

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

    I changed wiring.h to Arduino.h and it doesn't work

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

    can i use arduino nano for this project

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

      Yes of course!

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

      what have i to do with the library?

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

    I can't see

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

    I just got an error compiling! Pls Help!!!!

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

      Fixed it by moving it to C:\ProgramFiles (86x)\Arduino. Hope this helps!

  • @the5thstring500
    @the5thstring500 7 лет назад +8

    are you sure about the song ?

    • @oyinkstudios
      @oyinkstudios 6 лет назад +4

      The 5th String it sounds like Mary had a little lamb 🤔

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

    why is your arduino different from mine arduino uno?

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

      I think...It's his own 3D printed

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

      are u stupid or dum or both? you can't 3d print arduino you moron. he made it. ok. go to his channel and see one of the video named making arduino uno.

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

      @@imperialrecker7111 No, that's why all PCBs don't exist.

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

      @@boing7644 lol

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

    3:50 the frame that you forgot to blur! your welcome !

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

      Don't worry there is nothing secret there. It is just distracting! Cheers!

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

      ok i am literally doing the project now! so could you give me the arduino code only plz

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

      i am sorry i am not good in arduino

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

      plz answer me as soon as possible plz

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

      check the video description its all there

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

    Stairway to Heaven?

  • @thedankoona_5854
    @thedankoona_5854 8 лет назад

    3:49 whoops i can see the left side of your docs while you blurred it earlier

    • @Educ8s
      @Educ8s  8 лет назад

      +MEe$ :-) there is nothing secret there. It is just distracting

    • @thedankoona_5854
      @thedankoona_5854 8 лет назад

      +educ8s.tv aha okay :D

  • @ask-wj2pf
    @ask-wj2pf 6 лет назад +7

    Merry had a little lamb

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

    hello i have error...
    Arduino: 1.8.9 (Mac OS X), Board: "Arduino/Genuino Uno"
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer0_pin_port'
    sketch/Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer0_pin_mask'
    sketch/Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer1_pin_port'
    sketch/Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer1_pin_mask'
    sketch/Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer2_pin_port'
    sketch/Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer2_pin_mask'
    sketch/Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer0_toggle_count'
    sketch/Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer1_toggle_count'
    sketch/Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `timer2_toggle_count'
    sketch/Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
    (.text+0x0): multiple definition of `__vector_7'
    sketch/Tone.cpp.o (symbol from plugin):(.text+0x0): first defined here
    collect2: error: ld returned 1 exit status
    exit status 1
    Error compiling for board Arduino/Genuino Uno.
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

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

    Are you Greek?

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

    lOnDoN bRiDgE iS FaLlInG DoWn

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

    John Paul Empino sa fb

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

    Mary had a Little lamb

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

    poor programing. thi could sound much better. the output is turned on and off. that is what make the noise. the output must be on all the time an only digital interupt by software emulation must be trigger by buttons.

  • @user-ux5ku5ll4q
    @user-ux5ku5ll4q 7 месяцев назад +1

    I know what song he played, it is mary had a little lamb if anyone is wondering
    dont thank me its fine

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

    Pls

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

    BRO

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

    Answer me

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

    error compiling this for ardunio uno. plzzzz help

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

      I have made piano on my channel so visit it and make like mine its working properly

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

    I followed your instructions code and schematics but it behave strangely... It keeps looping on one tone without pressing any key

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

    Merry had a little lamb

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

    Pls