Hi everyone! we are trying to connect a DFplayer mini mp3 with an esp8266 and a speaker, we found the following code that should work, actually doesn't.
#include "Arduino.h"
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
#include <ESP8266WiFi.h>
SoftwareSerial mySoftwareSerial(2,5 ); // 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);
}
Serial.println(F("DFPlayer Mini online."));
myDFPlayer.volume(10); //Set volume value. From 0 to 30
myDFPlayer.play(1); //Play the first mp3
}
void loop(){
}
END of the code
this is the error:
Unable to begin:
1.Please recheck the connection!
2.Please insert the SD card!
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Soft WDT reset
stack>>>
ctx: cont
sp: 3ffffde0 end: 3fffffc0 offset: 01a0
3fffff80: 00000000 3ffee320 3ffee39c 402010c8
3fffff90: 00000040 00000000 feefeffe feefeffe
3fffffa0: 3fffdad0 00000000 3ffee3c4 402029a0
3fffffb0: feefeffe feefeffe 3ffe84e0 401011d9
<<<stack<<<
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3584, room 16
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld
we don't understand why, but we couldn't find a way to fix it.
our final purpose is to reproduce tracks from a micro sd which is connected with the dfplayer.
This is the circuit we found on internet (google pictures)
ESP8266 MP3 Sound Machine v2 - Self Hosted Home
if you have a solution, please answer, that's all thank you and hope to hear you soon!
