Introduction To The DFPlayer Pro
What Is DFPlayer PRO
The DFPlayer Pro-is a simple but powerful MP3 Player! This MP3 player module supports four controlling modes: Arduino, AT command, on-board buttons, and ADKEY. You can directly press the on-board button to play or switch music without using a controller. By using a USB cable, you can easily copy your favorite songs into this module to play them any where you want, or use it as a sound card for your PC or Raspberry Pi after connecting them together.
Compared with the previous DFPlayer Mini, the DFPlayer Pro has 128MB storage that can be directly used without a TF card, and the on-board Type-C socket makes it much convenient to use. And it offers dual channel output, better sound effects. Besides that, DFPlayer Pro is equipped with new functions like fast-forward, fast-rewind, play the audio from a particular point of the audio file, etc.
What Can It Do
The DFPlayer Pro can do everything you’ve become familiar with in the DFPlayer Mini with slightly different commands in Arduino. Lacking in this device is a BUSY Key, which (in the DFPlayer Mini) allowed a better flow of the code by sensing when a track was playing. With the DFPlayer Pro, a delay has to be hard coded in to keep the audio running for the desired length of the fx.
The available commands for Arduino allow you to choose a specific file by name, or select a file by it’s order in the directory. There are also previous and next commands to jump from file to file. You can fast forward, fast rewind, and start at a specific time in the audio file. Start, pause, and set volume are more available commands.
If you are a Mission Impossible fan, the delete current track can be used to “self destruct” a file within the directory!
Connecting To An Arduino Uno
To get the most control of the DFPlayer Pro, connecting it to an Arduino Device is the best solution. You can control the flow of your desired sound fx at specific times and durations through the aid of sensors or switches of your choice such as IR Sensors, UV Sensors, Proximity Sensors, whatever your desired method of control would be. Also flow of the code with conditional statements. The possibilities are limited only by your imagination. There have been many projects created throughout the years for the DFPlayer Mini that can be found on GitHub, the Arduino Project Hub, and YouTube videos, that can easily be converted to the DFPlayer Pro with minor adjustments with the new commands with this Library.
In my example I use and Arduino Uno, but you can use a Nano or Mega if you desire, depending on your application and available space. I’ve included two sketches in this tutorial to show different ways of controlling the player. I also included the example sketch and my first attempt at trying to control the DFPlayer Pro in the early hours of learning the included Library. You can build on these examples for your own project, or start from scratch. It’s up to you!
After all, it is Open Source. What does that mean for you?
Open source is a term that originally referred to open source software (OSS). Open source software is code that is designed to be publicly accessible—anyone can see, modify, and distribute the code as they see fit.
Open source software is developed in a decentralized and collaborative way, relying on peer review and community production. Open source software is often cheaper, more flexible, and has more longevity than its proprietary peers because it is developed by communities rather than a single author or company.
Open source has become a movement and a way of working that reaches beyond software production. The open source movement uses the values and decentralized production model of open source software to find new ways to solve problems in their communities and industries.
In other words… You can copy code to your hearts content.
If you do use someone else’s code with little on no modification, it’s good practice to acknowledge the original creator!
Better yet! Drop A Donation via PayPal to show your appreciation!
Arduino Connection
Arduino Uno Pinout
Pin Identification
DFPlayer Pro Pin Out
Take At Look Behind The Scenes
See What was Involved Working With DFPlayer Pro For The First Time
Useful Links:
************************