Getting DFPlayer to work

Hi.

I'm very new to Arduino. I've been able to get an LED light to dim. But now I'm trying to get a DFPlayer mini to work with my Arduino Uno R3. I've gotten it to work once, but it hasn't work since. I have 2 DFPlayers & Arduino Uno R3s and neither of them are working. I've doubled triple checked my schematic and nothing seems to work. I'm not able to use the sprintf statements as they don't display anything (I'm using 2.3.2 version of the IDE). How can I tell if I blown the circuit board?


sd Files

#include "Arduino.h"
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"

SoftwareSerial mySoftwareSerial(10, 11); // RX, TX

DFRobotDFPlayerMini myDFPlayer;

void setup()
{
mySoftwareSerial.begin(9600);

Serial.begin(115200);
// Serial.println(F("Initializing DFPlayer module ... Wait!"));
// if (!myDFPlayer.begin(mySoftwareSerial))
// {
// Serial.println(F("Not initialized:"));
// Serial.println(F("1. Check the DFPlayer Mini connections"));
// Serial.println(F("2. Insert an SD card"));
// while (true);
// }

// Serial.println();
// Serial.println(F("DFPlayer Mini module initialized!"));


myDFPlayer.setTimeOut(500); //Timeout serial 500ms
myDFPlayer.volume(30); //Volume 5
myDFPlayer.EQ(0); //Equalizacao normal
myDFPlayer.start();
}

void loop()
{

myDFPlayer.play(1);
//delay(3000);
//myDFPlayer.play(2);
//delay(4000);
//myDFPlayer.stop();
}

A couple of things to try:

  1. Move myDFPlayer.play(1); from loop() to the end of setup(). Right now you're continuously blasting that command at the DFPlayer and it's never being allowed to play anything.
  2. Disconnect the Rx and Tx lines to the DFPlayer and momentarily ground pin 11 on the module. That should play the next track.

What do you mean by "momentarily ground pin 11 on the module"? take a wire and insert one end into pin 11 on the arduino and the other into the ground pin on the arduino while the arduino is powered up?

Pin 11 on the DFPlayer module.

the first suggestion didn't work.

after doing your second suggestion, it worked. Thanks

That's good news. The DFPlayer module works, as does the speaker.

And oh! I see it. You've commented out the myDFPlayer.begin(mySoftwareSerial) call. None of the other calls to myDFPlayer will work without that.

Thanks for your help! Now to play the sound byte then turn on the LED and have it dim.