switches and sounds
Topic: switches and sounds
(Read 676 times)
switches and sounds
Aug 31, 2011, 01:17 am
Hi Everyone - I'm a complete newbie at all this, so I apologize in advance if this doesn't make any sense. I have an Arduino UNO, and I'm just trying to determine if what I want to accomplish is possible using it, or anything else for that matter.
I'm building a weird interactive music box as a gift for a friend. The box has an iPod dock that is connected to a Class-T digital amp that is of course connected to the speakers.
The box has five lights - 12 volt auto bulbs - each of which are connected to a corresponding pushbutton on/off switch. These are the switches I'm using, if it's helpful - http://tinyurl.com/42j9os4
All of the lights go through one master dimmer, and there is also a 12V DC motor that rotates a disc that is connected to a speed controller. The whole box is powered with a Pyramid 20A power supply.
So, here's what I want to do - I want to somehow make it so when a light switch is turned on, a specific corresponding note plays through the speakers. Imagine a five note-scale - Do-Re-Mi-Fa-So. Switch #1, while also turning the corresponding light on would somehow trigger the "Do" sound to play through the speakers. Switch #2 would play Re, and so on. And these sounds should only play once when the switch is turned ON, and the sound itself should only last a few seconds.
The only thought I had is that I could somehow connect the switches to an Arduino board that had stored sound files. But since I am brand new to the world of Arduino, I have no idea how I could send that message from a standard electrical switch to the board, or how the individual switches could be differentiated. Assuming all that could happen, I would also need to figure out how to have the Arduino send the correct sound file to the speakers - though that last part is probably the least of my problems.
Okay, thanks for any guidance you might be able to give me, and be sure to let me know what other information I can give you that might make this make more sense.
Unlimited Eagle board sizes available.
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
Re: switches and sounds
Aug 31, 2011, 01:26 am
I think something like this would do it for you.
Read your button, send a command to the card.
Maybe replace your 12V lights with bright LEDs that this card drives.
Designing & building electrical circuits for over 25 years. Screw Shield for Mega/Due/Uno, Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at my website.