You seem to have changed the code from:
DFRobotDFPlayerMini mp3(8, 9);
to
DFPlayerError mp3(8,9);
Is that because you got the error I got?
sketch_aug28b:4:29: error: no matching function for call to 'DFRobotDFPlayerMini::DFRobotDFPlayerMini(int, int)'
DFRobotDFPlayerMini mp3(8, 9);
^
Looks like you are creating the DFPlayer object incorrectly. This is how it is done in the "GetStarted" example from the DFPlayer library.
#include "Arduino.h"
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
SoftwareSerial mySoftwareSerial(10, 11); // RX, TX
DFRobotDFPlayerMini myDFPlayer;
void printDetail(uint8_t type, int value);
void setup()
{
mySoftwareSerial.begin(9600);
Serial.begin(115200);
Serial.println();
Serial.println(F("DFRobot DFPlayer Mini Demo"));
Serial.println(F("Initializing DFPlayer ... (May take 3~5 seconds)"));
if (!myDFPlayer.begin(mySoftwareSerial)) { //Use softwareSerial to communicate with mp3.
Serial.println(F("Unable to begin:"));
Serial.println(F("1.Please recheck the connection!"));
Serial.println(F("2.Please insert the SD card!"));
while(true){
delay(0); // Code to compatible with ESP8266 watch dog.
}
}
Serial.println(F("DFPlayer Mini online."));
myDFPlayer.volume(10); //Set volume value. From 0 to 30
myDFPlayer.play(1); //Play the first mp3
}