Magnetic Sensor and SD Shield

Hey everyone, basically this project includes an Arduino Uno, magnetic switch sensor, and the Seeed SD card Shield. When the magnetic sensor is tripped, the arduino fetches and plays a sound from the SD card to a speaker.

My questions are: - How would one go about wiring the sensor up to the arduino? I see the Com. NC and NO labels above the screws (see link above), but how do I wire that to the arduino? - Where could I find the library for the SD Shield? I checked their website but didn't find anything. - What would be some sample code to go by? Even finding how to do each function (when the sensor's magnetic field does not detect its counterpart, retrieve the music file from the SD card and play it through a speaker) separately and I could change and compile them together myself would be helpful.

I'm pretty new to sensors (and find them absolutely fascinating!) but I'm majoring in Robotics/Photonics in college. I'm pretty decent when it comes to some programming languages (HTML, CSS, AS2, and currently learning C/C++ and Ladder Logic). I've played around with the arduino before, but not on a scale like this to start a project.

Thank you for your time,


P.S. I apologize if this is posted in the wrong section. Feel free to move appropriately. ;)

Ok what you want to do is simple, but the arduino will only be able to play single tones that you make, not like an mp3 shield, where that can play an actual song. Not saying that you can't play a little melody but is would be a little more work.

You are going to have trouble playing songs, but the switch is easy enough. Wire one end to Ground, and the NO (normally open) to one of the digital pins. Set the internal pull-up (pin input, but high) and then when the pin reads low you know the switch is pressed.

Thanks for the quick replies. The file I want to retrieve and play is 180kb and 3 seconds long. Also does anyone know where to find sample code and the SD card library?