Skip to content

An arduino-based MP3 player using the DFPlayer Mini and the OneButton, DFPlayerMini_Fast, FireTimer & EEPROM libraries

Notifications You must be signed in to change notification settings

ashleycox/Arduino-MP3-Player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Arduino MP3 Player

An arduino-based MP3 player using the DFPlayer Mini and the OneButton, DFPlayerMini_Fast, FireTimer & EEPROM libraries. Be sure you have those installed before attempting to compile the sketch.

The sketch implements 3 buttons. Button one skips to the next / previous tracks with a single or double press respectively, and decreases the volume when held. Button 2 pauses and resumes playback when pressed, stops playback on a double click and increases the volume when held. Button 3 randomises playback when pressed, but is otherwise unused. You can have as many buttons as you have digital or analogue pins, and can assign actions to 5 buttons states (click, double click, long press start, long press hold and long press release).

It is possible to implement every function of the DFPlayer by sending discrete commands from your sketch, but in my opinion a good library makes things much neater and it doesn't add much weight to the code. FireTimer is used here to add a nice volume ramp delay as it is required by the DFPlayerMini_Fast library anyway. The built-in EEPROM library is used to store the current volume in the EEPROM. Tested on an Arduino Nano, there are plenty of resources left for extra code for example running RGB LEDs, an LCD display or even a touchscreen.

About

An arduino-based MP3 player using the DFPlayer Mini and the OneButton, DFPlayerMini_Fast, FireTimer & EEPROM libraries

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages