This example shows the basic function of library for DFPlayer.īy [Angelo Lesser General Public License.Īll above must be included in any redistribution It plays all the MP3s on the SD card for three seconds each and then moves to the next file. The following code is the sample code you can find after installing the program library in the menu under File>Examples>DFRobotDFPlayerMini>GetStarted. Install the mentioned library DFRobotDFPlayerMini. To do this, go to the menu Sketch>Include Library>Manage Libraries … in the Arduino software. To use the DFPlayer the program library DFRobotDFPlayerMini must be installed. I have not tested this □ Software Preparation The DFPlayer should be able to manage up to 100 folders with up to 255 MP3s. They are played in the order in which they were copied to the card. Once the card is formatted, MP3 files can be copied to it. If this setting is not made, the SD card will not be recognized and the DFPlayer module will not be initialized. On Mac, the partition table must also be set to master boot record. ![]() The SD card must be formatted in FAT16 or FAT32 format. So here a stereo output would also be possible. Alternatively it would be possible to connect a preamplifier or headphones to the pins DAC_L, DAC_R and GND instead of the speaker. The last thing to do is to connect a speaker to the DFPlayer. It allows to use a second serial port on other pins. In order not to block the native RX and TX pins of the Arduino (0 and 1), we use the software serial library. ![]() The DFPlayer is first connected to 5V+ and GND, then its RX and TX pins are connected to the Arduino pins 10 and 11. Wiring diagram: DFPlayer Mini with Arduino Control signals can then be sent directly to the player via a special program library. In the I/O mode of the DFPlayer Mini a serial communication between Arduino and DFPlayer is used. In the following, this tutorial will deal with the latter case. These include Serial mode, in which commands can be received via the computer’s serial port, AD Key mode (Stand Alone), in which many buttons can be read with specific series resistors, and I/O mode, which is used when used with the Arduino board. The DFPlayer Mini has different operating modes. Short press to play next track, long press to increase volume Short press to play previous track, long press to decrease volume
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |