Tag Archives: mp3 player shield

door welcome music

finished the ‘door welcome music’ project and it’s working pretty nicely: when the door to our flat is opened a random mp3 will play and welcome the guest or say good bye. a panic button can be pushed to switch off the music immediately when needed. (video link)

hardware

a magnet is attached to the door and when it passes the hall sensor on the frame it will trigger a mp3 file. see the fritzing image for further reference about wiring the hall sensor and the push button. i am using the sparkfun mp3 player shield, as well as the proto screw board on top of it. also a cat-5 (normal ethernet cable) is utilized to connect sensor and arduino which makes it way less messy.

door welcome music - complete system

door welcome music - hall sensor and door

door welcome music - arduino setup in boxdoor welcome music - arduino setup in boxdoor welcome music - panic buttondoor welcome music - breadboard setup

software

thanks to the awesome work of bill porter and bill greimann I can use their smooth libraries for this project: sparkfun mp3 player shield library and sdfat library. apart from that, the coding is pretty straight forward. whenever the magnet is sensed start to play the track, play it for a minute. if the button is pressed before that, stop the music. then pause for 30 seconds to avoid continous triggering. you can download the complete source code for this project here.

Tagged , , , , ,
Follow

Get every new post delivered to your Inbox.