Stop() plays mp3 with DFRobotDFPlayerMini Arduino UNO

I am working on a project with Arduino UNO but I'm having trouble with the mp3 player. I made a simple project to test this and what I'm finding is that when it's supposed to "play" it does nothing, but when told to "stop" it will play the previously instructed play file.

Any idea why this would be happening?



//Speaker
// For serial connection to DFPlayer audio module
#include <SoftwareSerial.h>
// For playing sounds from DFPlayerMini module using the serial connection
// Modified from https://github.com/DFRobot/DFRobotDFPlayerMini
#include "src/DFRobotDFPlayerMini/DFRobotDFPlayerMini.h"
const byte TxToDFPlayerSpeaker = 10;//4;
const byte RxFromDFPlayerSpeaker = 11;//5;
SoftwareSerial softwareSerialSpeaker(RxFromDFPlayerSpeaker, TxToDFPlayerSpeaker); // RX, TX
DFRobotDFPlayerMini dfPlayerSpeaker;


void setup() {
  // Start the serial connection
  Serial.begin (9600);
    Serial.print(F("Initialising software serial interface to DFPlayerSpeaker..."));
  for(int i=0; i<10; i++) {
    softwareSerialSpeaker.begin(9600);
    delay(500);
    if(dfPlayerSpeaker.begin(softwareSerialSpeaker)){
      Serial.println(F("OK!"));
      break;
    }
    else { 
      Serial.print("."); 
      }
    if(i==9) {
      Serial.println(F("Failed :("));
      return;
    }
  }
  // Set volume (value from 0 to 30)
  dfPlayerSpeaker.volume(30);

    //reset sounds test
  Serial.println("speaker reset test begin");
  delay(500);
  Serial.println("stop");
  dfPlayerSpeaker.stop();
  delay(500);
  Serial.println("play");
  dfPlayerSpeaker.playMp3Folder(1);
  delay(500);
  Serial.println("stop");
  dfPlayerSpeaker.stop();
  delay(500);
  Serial.println("play");
  dfPlayerSpeaker.playMp3Folder(1);
  delay(500);
  Serial.println("stop");
  dfPlayerSpeaker.stop();
  delay(500);
  Serial.println("play");
  dfPlayerSpeaker.playMp3Folder(1);
  delay(500);
  Serial.println("speaker reset test finished");
  delay(5000);

}

void loop() {
  // put your main code here, to run repeatedly:

}

Well, I'm surprised it works at all, because it doesn't even complile for me.
:slightly_smiling_face:

So before looking further could you please try it with what I regard as the correct library name:

#include "DFRobotDFPlayerMini.h"

My DFRobotDFPlayerMini library is simply kept in a folder called "src"

Then I assume your sketch - surprisingly - does compile, unlike here?

You have your Rx/Tx lines reversed. With those two lines corrected your sketch runs OK .

You've ran it with the DFRobotDFPlayerMini and it works, or are you saying it only compiles and uploads ok?

I meant exactly what I said.

Have you corrected your mistake and run the sketch again?

I've edited these lines to be accurate:

const byte TxToDFPlayerSpeaker = 10;//TX=Blue=10 
const byte RxFromDFPlayerSpeaker = 11; //RX=Purple=11 
SoftwareSerial softwareSerialSpeaker(TxToDFPlayerSpeaker, RxFromDFPlayerSpeaker); // TX, RX

I am following the diagram here: MP3 player using Arduino and DFPlayer mini - Electronics-Lab.com

Here is my version

The original issue of stop() playing a track and play() stopping a track seems to persist.

What seems to make a difference is the amount of delay before issuing commands to the dfPlayer(). If It there is a delay of about 7 seconds (either through dfPlayerSpeaker.setTimeout(7000) or simply delay(7000)) then everything seems to work.

No delay at all seems to cause the first several commands to be ignored (or perhaps they are started later with the next commands).

Ok, late here so will look at that tomorrow.

Photos are rarely helpful unless accompanying a schematic.

Yes, this DFR module is frustratingly fussy about delays. Inconsistent too.

Taking a proper look this morning at your last post. I'm confused! :slightly_smiling_face: Your sketch and photo show no similarity to that referenced project?

And to be honest I don't fully understand your actual objective? Your original post essentially asked “why doesn’t my sketch do what I think it should do?” It would be better to tell us exactly what you want to do. Can we assume that your aim is to achieve the same as your referenced project?

Regarding delays: in most cases you will need one that's at least as long as the track, after any play() command . So that explains why much of your sketch is not working as it stands.

I note that you've now told us you are using a folder-based structure for your tracks, yes? No problem, but a simple flat structure in the root is simpler - although you must be alert to the tracks playing in the order they were added to the card.

Meanwhile try experimenting with this example. Note my pin numbers chosen for the Uno and breadboard at hand, and my comments.

/*
   Thu 3 Oct 2024 0623
   Very simple example, loop() repeatedly plays next track,
   for duration specified.
*/

#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
SoftwareSerial mySoftwareSerial(10, 11); // RX, TX
DFRobotDFPlayerMini myDFPlayer;

void setup()
{
  Serial.begin(115200);
  delay(200);
  // Identify sketch
#define __FILENAME__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
  Serial.println(__FILENAME__);

  mySoftwareSerial.begin(9600);

  myDFPlayer.begin(mySoftwareSerial); // Start communication with DFPlayer
  // myDFPlayer.begin(mySoftwareSerial, true, false); // Start communication with DFPlayer

  myDFPlayer.volume(10);
  //  delay(1000); // Sometimes needed

  // Play a test track; e.g. track 1, so loop() will play the rest.
  myDFPlayer.play(1);
  delay(5000);

  // For simplicity at this stage I've omitted the player tests
  // in DFR's own examples. You'll know soon enough if it's working!
  Serial.println("Setup ended");
}

void loop()
{
  // Play all tracks successively, then repeat.
  myDFPlayer.next();
  delay(8000);  // Play this much of each track
}

I'm following the same schematic as the referenced project, minus the buttons https://www.electronics-lab.com/wp-content/uploads/2018/03/mp3-player.png

The aim of this is to determine the cause of the issue I'm having. Sometimes the commands issued to the DFPlayer are not working, such that play() will play nothing until another command, such as stop() is called. This isn't just with this sketch and schematic, but on all attempts to use the DFPlayer.

I have a larger project where I want to use the DFPlayer but this is meant to be a simpler sketch to focus on the issue.

I'll experiment with your suggestion regarding the delays. But this wouldn't explain why the first play track has trouble playing.

I'd assumed you'd take a minute to try the crucial delay increases I suggested. I've just done so and it works exactly as I'd expect. No need for that stop() and play() stuff.

/*
   Thu 3 Oct 2024 0623
   Very simple example, loop() repeatedly plays next track,
   for duration specified.
*/

#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
SoftwareSerial mySoftwareSerial(10, 11); // RX, TX
DFRobotDFPlayerMini myDFPlayer;

void setup()
{
  Serial.begin(115200);
  delay(200);
  // Identify sketch
#define __FILENAME__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
  Serial.println(__FILENAME__);

  // Perform initialisation the correct way
  mySoftwareSerial.begin(9600);

  myDFPlayer.begin(mySoftwareSerial); // Start communication with DFPlayer
  // myDFPlayer.begin(mySoftwareSerial, true, false); // Start communication with DFPlayer

  myDFPlayer.volume(10);
  //  delay(1000); // Sometimes needed

  // Play tests
  Serial.println(F("Begin tests"));
  Serial.println(F("plays for 1st time"));
  myDFPlayer.playMp3Folder(1);
  delay(3000); // Done OK

  Serial.println(F("plays for 2nd time"));
  myDFPlayer.playMp3Folder(1);
  delay(3000); // Done OK

  Serial.println(F("plays for 3rd time"));
  myDFPlayer.playMp3Folder(1); // Done OK
  delay(3000); // Plays full track (10 s in my case) because there
// are no further play() commands.
  Serial.println(F("Tests finished"));
}

void loop()
{
}

/*
 * Monitor print output
 * 
  14:39:37.708 -> dwwelch-example-e1.ino
  14:39:38.399 -> Begin tests
  14:39:38.399 -> plays for 1st time
  14:39:41.446 -> plays for 2nd time
  14:39:44.446 -> plays for 3rd time
  14:39:47.482 -> Tests finished
*/

I'm out of town so I don't have access to the hardware to try it out.

Your code only has a delay(200) before you play anything and it works. From my tests, mine would not without a longer delay. Also, your serial connection code is different than mine. I don't think I've been successful at connecting to the DFPlayer the way you are doing it, but I'll try it again.

If I added delays that are the length of the track, wouldn't that prevent the ability to stop and play new tracks abruptly?

Go ahead and do what I’d rather assumed you had already done, and see for yourself.

Expect my results on Monday. Thanks for your help.

I ran your sketch.

Nothing plays until the third attempt ("plays for the 3rd time")

This is consistent with my earlier results where I theorized some kind of delay of around 6-8 seconds is required before it starts following commands. The combined delays after serialization in this sketch are 6 seconds.

What do you think? What should I try next?

Your sketch in post #1 is completely different from your reference link in post #7. A random image from the link is meaningless. Post the sketch you are using and a wiring diagram that reflects the sketch.

First, echoing @xfpd, please post the exact sketch you ran and its schematic. Important to be in sync.

Meanwhile - hopefully to shorten the long gaps between your posts - I can confirm that I just ran my earlier sketch again, from post #11 four days ago, on a Uno, with the same success.

Redouble your checking.

And, to stay in sync, then use the following sketch which has minor edits:

/*
   Mon 7 Oct 2024 1215: Checking. Compiles, uploads and runs OK.
   Mon 7 Oct 2024 1227: Trivial edits
    - Fixes the powerup noise issue
    - Plays different three tracks for variety
    - Simplifies the play commands from 'playMp3Folder()' to
        play(). Same result in both cases.
    - Revised comments
*/
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
SoftwareSerial mySoftwareSerial(10, 11); // RX, TX
DFRobotDFPlayerMini myDFPlayer;

void setup()
{
  Serial.begin(115200);
  delay(200);
  // Identify sketch
#define __FILENAME__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
  Serial.println(__FILENAME__);

  // Perform initialisation the correct way
  mySoftwareSerial.begin(9600);

  //  myDFPlayer.begin(mySoftwareSerial); // Start communication with DFPlayer
  myDFPlayer.begin(mySoftwareSerial, true, false); // Start communication with DFPlayer

  myDFPlayer.volume(15);
  //  delay(1000); // Sometimes needed

  // Play tests
  Serial.println(F("Begin tests"));
  Serial.println(F("plays for 1st time"));
  myDFPlayer.play(1);
  delay(3000); // Plays OK

  Serial.println(F("plays for 2nd time"));
  myDFPlayer.play(2);
  delay(3000); // Plays OK

  Serial.println(F("plays for 3rd time"));
  myDFPlayer.play(3); // Done OK
  delay(3000); // Plays OK, FULL track (10 s in my case) because
  // there are no further play() commands.
  Serial.println(F("Tests finished"));
}

void loop()
{
}

/*
  Monitor print output

  12:20:59.829 -> MyRecentPost-dwwelch-e1.ino
  12:20:59.829 -> Begin tests
  12:20:59.829 -> plays for 1st time
  12:21:02.876 -> plays for 2nd time
  12:21:05.897 -> plays for 3rd time
  12:21:08.883 -> Tests finished

*/

EDIT: You could also eliminate one other possible cause. I use version 1.0.5 of the DFR library because I believe 1.0.6 is buggy.

I installed the 1.05 zip library from here but am getting errors on compilation (DFRobotDFPlayerMini - Arduino Libraries)

These errors also persist on 1.06. The difference between now and before is that instead of installing a zip I was linking to a DFRobot DFPlayerMini library in a directory.

That version seems to be 1.03. I switched to version 1.03 and that is also giving these same errors.

But it will compile without errors if I point back to my directory library by changing this line.

#include "src/DFRobotDFPlayerMini/DFRobotDFPlayerMini.h"

Not sure why this is an issue. Should probably resolve it before further testing.

...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::setTimeOut(unsigned long)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::uint16ToArray(unsigned int, unsigned char*)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::calculateCheckSum(unsigned char*)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::enableACK()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::disableACK()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::readType()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::read()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::handleMessage(unsigned char, unsigned int)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::handleError(unsigned char, unsigned int)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::readCommand()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::parseStack()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::arrayToUint16(unsigned char*)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::validateStack()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::available()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::sendStack()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::sendStack(unsigned char, unsigned int)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::sendStack(unsigned char)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::sendStack(unsigned char, unsigned char, unsigned char)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::waitAvailable(unsigned long)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::next()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::previous()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::play(int)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::volumeUp()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::volumeDown()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::volume(unsigned char)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::EQ(unsigned char)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::loop(int)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::outputDevice(unsigned char)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::sleep()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::reset()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::begin(Stream&, bool, bool)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::start()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::pause()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::playFolder(unsigned char, unsigned char)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::outputSetting(bool, unsigned char)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::enableLoopAll()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::disableLoopAll()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::playMp3Folder(int)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::advertise(int)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::playLargeFolder(unsigned char, unsigned int)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::stopAdvertise()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::stop()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::loopFolder(int)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::randomAll()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::enableLoop()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::disableLoop()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::enableDAC()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::disableDAC()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::readState()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::readVolume()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::readEQ()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::readFileCounts(unsigned char)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::readCurrentFileNumber(unsigned char)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::readFileCountsInFolder(int)'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::readFolderCounts()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::readFileCounts()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\libraries\DFRobotDFPlayerMini-1.0.5\DFRobotDFPlayerMini.cpp.o (symbol from plugin): In function `DFRobotDFPlayerMini::setTimeOut(unsigned long)':
(.text+0x0): multiple definition of `DFRobotDFPlayerMini::readCurrentFileNumber()'
...\AppData\Local\Temp\arduino-sketch-734275D89608E4DB279462920C398DA5\sketch\src\DFRobotDFPlayerMini\DFRobotDFPlayerMini.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

I agree that this needs resolving before proceeding. I don't know why you have/had the DFRobotDFPlayerMini.h library in that strange looking location.

Perhaps one of the IDE gurus will comment, but AFAIK (and as you can read in the Arduino Reference documentation, etc), all contributed libraries (and some others) should be in a subfolder named \libraries within your \Sketches folder. For example mine are here:
C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\libraries

What have you specified as your Sketchbook location in the File > Preferences dialog?