Hi all,
Im trying to get a DFplayer mini working on my Nodemcu ESP8266 with wifi and OLED.
It part of a bigger project, but i can not get the DFPlayer to work on a basic sketch, all i get is a clicking sound now and then. I have tried the TX and RX on the ESP8266, tried 4, 5 pins changing sketch to match.
The DFplayer works on its own playing a MP3. Has a 5v power source.
What am i doing wrong? Is there a sketch that can test comunication to the DFplayer?
#include <SoftwareSerial.h>
#include <DFRobotDFPlayerMini.h>
SoftwareSerial mySerial(4, 5); // RX, TX
DFRobotDFPlayerMini myDFPlayer;
void setup()
{
mySerial.begin(9600);
Serial.begin(115200);
if (!myDFPlayer.begin(mySerial))
{
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);
}
myDFPlayer.volume(20); // Set volume (0 - 30).
myDFPlayer.play(1); // Play the first MP3 file on the SD card.
}
void loop()
{
// Do nothing here, as we want the MP3 to play on power-on and not loop anything.
}