greencoder / featherwing-random-mp3-player

A shuffling MP3 player using the Adafruit FeatherWing Music Maker
MIT License
0 stars 0 forks source link

featherwing-random-mp3-player

A shuffling MP3 player using the Adafruit FeatherWing Music Maker.

I have a project in mind that will play music files with no interface, just a power switch. (kind of a self-playing jukebox)

I used an Adafruit Music Maker FeatherWing on a ESP8266 Feather Board to implement the MP3 player portion.

This code will read all the MP3 files in the root directory of the SD card and continuously play them in random order. It will skip over directories and hidden files. (like the .Spotlight-V100 MacOS puts on the card)

Because of memory limitations, it's not possible to read all the names of the files into an array and sample from it. Instead, I count the number of MP3 files on the SD card, then I choose a random number between 0 and count to pick a song to play. There is no checking to see if the file has been recently played, that would be a nice feature to add. (Pull requests gladly accepted!)

Limitations: