General

FN-M16P Embedded MP3 Audio Module using DFRobotDFPlayerMini.h" include file.

userHead Richard.Lincoln 2023-06-29 02:00:35 191 Views2 Replies

Hello Forum,

I have built a mini MP3 player using an “Arduino Nano” with an “FN-M16P Embedded MP3 Audio Module”.  The program that drives the player uses "DFRobotDFPlayerMini.h" include file.  The player is intended to play two different MP3 music files.  Each file is intended to play based on two separate inputs to the Nano.  I would like to stop the first file from playing when a second input is received and play the second file.  I have looked at the source for the "DFRobotDFPlayerMini.h" and see there is a “Stop” function.  My question to you is: Is the Stop function implemented in the “dot h” file?  If it is, what is the syntax for the instruction?  Are there any declarations that need to be made along with other data declarations?  If the “Stop” function is not implemented, would you be able to do so to modify the “dot h” file?  I will be grateful for any assistance you can provide.

2023-08-23 18:20:25

Hi,

 

The 'Stop' function is declared in the '.h' file and implemented in the '.cpp' file.Implementation principle: This command will put '0x16' in the 'CMD' position in the data format, which means stop playing.This does not need to be done with other declarations, you could use 'myDFPlayer.stop();' directly in the Arduino IDE, and then it will work.

 

 

userHeadPic Afra