DFplayerMini example code using DFRobotDFPlayerMini library.

This is an rather full featured program to operate a DFplayerMini.

In addition to the usual mp3 player functions like next/previous/play/pause, it also tracks directory and file counts so that next/previous can be used for next folder/previous folder. There is a playlist include file that is used to described the album being played.

I run this on a Nano with a I2C connected 20x4 LCD although there is sufficient Serial messaging to follow the player’s state.

myPlayer3_LCD.ino (17.5 KB)

playlist.h (2.41 KB)