Go Down

Topic: Playing a MP3 file (Read 719 times) previous topic - next topic

zgowap

Hello,
I am a complete beginner in Arduino.
I only managed to make a GSR sensor (galvanic skin response) that turns on one or several LED when voltage detected.
Now I would like to switch LED for MP3 sounds. For this, I bought a music shield (from seeedstudio) and a micro SD card where I put some short mp3 fils; but I didn't succeed to find the code that play a specific mp3 file.
Any help would be appreciated!
(Music Shield is working but only play files one by one...)

dash1982

My method is:  First scan the whole SD card to list all of the mp3 files,  store them and their directory structure into a temp file, then generate the real PlayList file from this temp file.
When arduino works, it will read the items from this PlayList file, play them.  When you did some changes to SD card(eg. add new songs, or delete some songs), arduino will check the newest timestamp, automatically update the PlayList file.

The playing mode could be controlled by writing some functions , now my mp3 could support random/sequence playing.

Go Up