Introduction: MP3 ALARM
Play songs off of a micro sd card to wake you up in the morning. Set the desired alarm time once and never have to mess with it again. A button turns off the alarm which start playing whatever mp3s you have on the micro sd card.
MP3 Player Shield
Push button switch
An aux speaker
A power source if desired
Step 1: Build
Place your shield on top of the arduino and then connect the push button to A5 and ground. The button serves as a stop instead of reseting the board. Plug in the aux speaker to the shield.
Step 2: Code for the Sound
Download SDFat (https://github.com/greiman/SdFat), SDFatUtil(https://github.com/adafruit/SD/blob/master/utility..., and SFEMP3Shield(https://github.com/madsci1016/Sparkfun-MP3-Player-...) libraries onto your board. Go to examples and in SFEMP3Shield open "File Player".
Download mp3 songs onto the micro sd and name them "track.001", "track.002", etc. But only nine songs will work well with the shield. Put the mp3s on your micro sd and put in into the shield. Back in the File Player example, upload to your board and open the serial monitor. You might have to set the baud to 115200 bps. Send command "1" and you should hear sound starting to play. If not check if your file is named correctly or put your micro sd into your computer and go into properties. Change into to the sd fromat SD32 and try again.
Step 3: Adding the Alarm
The code here is pulled from a LCD alarm clock so if you go through and insert lcd instead of serial youll be able to add a display. But disclaimer, it runs on delays. (Maybe add what song is playing too?)
Step 4: Merge the Codes
Okay merge the codes together and add a trigger to start playing songs. You'll have to set the time on your computer once and the alarm. After that make a case or add lights and you'll have a fun addition to your room!
Participated in the