Hi how do i program buttons to play music items on a speaker?
Do you think you have given us enough information?
...R
zentagon:
Hi how do i program buttons to play music items on a speaker?
have a look at tone()
function in the Reference page.
OK i should go on with more details i guess...
I want to build a flamethrower prop from team fortress 2 and at the outer barrel i will mount a speaker. my plan was to connect this speaker to my arduino uno card and then place a button on the handle. As i push the button the arduino would play the sound of the flame thrower on the speaker. but i don't know how to program the speaker and what i need more for such a project. I have planed to run it on 9 volt batteries but i don't know if that is enough. I am also new to arduino, I have a degree in programing with matrix 28 cards. i have tried out some programs on the arduino and changed some to test it with leds and buttons but i have no idea about the sound programming...
Hope this brings a better view of the picture..
but i have no idea about the sound programming...
Check the reference page. There doesn't seem to be much in the Music section does there? Ever wonder why?
Get a Wave shield: Adafruit Wave Shield for Arduino Kit [v1.1] : ID 94 : Adafruit Industries, Unique & fun DIY electronics and kits
Put some music on the SD card. Call palyfile(). Job done.
Edit: Or, it would be if you called playfile(), instead.
Alright i will have a look into it! Thanks!