Hi everyone, I've tried everything to get it working, but my Arduino Nano setup with the DFPlayer simply doesn't work. I don't know what I did wrong. I'm attaching a picture and the code. Please, someone help.
(Problem:1. Please recheck the connection!,2. Please insert the SD card!)
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
SoftwareSerial mySerial(10, 11); // RX, TX
DFRobotDFPlayerMini myDFPlayer;
void setup() {
mySerial.begin(9600);
Serial.begin(115200);
Serial.println();
Serial.println(F("DFPlayer Mini Demo"));
Serial.println(F("Initializing DFPlayer ..."));
if (!myDFPlayer.begin(mySerial)) { // Use softwareSerial to communicate with DFPlayer Mini
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(30); // Set volume to maximum (0-30)
myDFPlayer.play(1); // Play the first MP3 file
}
void loop() {
// No need for code here in this simple test
}
Hello, I just put it there for the picture so that everything would be visible, I was careful about that! (It was turned off when the picture was taken)
Hi! Thanks for the hint. That helped me to make DFPlayer work after 2 hours of debugging. How did you figure out? OP did everything in accordance with the schematics, I believe. I mean RX was connected to D10, which is initialized as RX, and TX to D11, initialized as TX.