Switches and Audio using Arduino

Hi, this could be a pretty basic question, but if you could help me it would be great.

Basically, we're setting up an installation where people will be mingling. One of the things we want it to do is so when you someone steps on a switch, a particular audio file will play.

So, the questions:

  1. I have one switch up a running making an LED turn on and off. Easy peasy. I'm making homemade ones that will be big enough to step on. I believe in theory I could have up to 11 or 12 switches (and hence 11 or 12 pieces of audio), depending on the number of digital pins. Is this right?

  2. How would I go about getting an audio file to play once a switch is pressed? Can I do this through the Arduino environment or will I have to bring it into something else?

Thanks in advance if you can help me.

  1. Sounds right. You can actually use all 20 pins with the digitalRead command , which means upto 20 switches. You won't be able to use 2 of those though, as they are used for serial communication, which will be used if you go with #2 below. Just use the analog pins like you would a digital. More info can be found here Arduino Playground - Pins

  2. Check out mikmo's app. Gadgets og teknologi | Dansk Tech Blog - Mikmo

This app will sit on your computer and listens for commands from the arduino. It has the ability to do many things, one which is to start a program. I haven't used the app personally, but you might be able to have it execute an audio file, in which case it will perform the same action as double clicking on a file. Now just hook up speakers to the computer, and depending on which switch is pressed, the arduino will send a different command, thereby calling up a unique file.

I think this might be the quickest/easiest way to get things up and running.

Hi, thanks for the info.

Unfortunately the above app only works for PC, I'm on a Mac. Should of mentioned it above but completely slipped my mind.

Anyone heard of something similar that could be used maybe?
I'm pretty sure it will be strictly audio files. It'll be set up so when a button is pressed, the audio file will be play for a small length of time, and will then sort of 'reset' so when its pressed again the same file will play, depending on the button.
For example, we're toying with the idea of puddles, so when you step in one, you'll hear a splash, or splashes depending on many you step on.

http://www.arduino.cc/playground/Main/InterfacingWithSoftware

Yeah, I was thinking that would be route I'd have to go down. Any recommendations on which to use or is it all preference? I have some experience with Pd and Flash.

Its all preference, my suggestion is to pick the easier one.