Using DFRobot DFMini Player with Arduino Mega

It seems you have not included the library.

#include "DFRobotDFPlayerMini.h"


DFRobotDFPlayerMini myDFPlayer;

void setup() 
{
  Serial.begin(9600);
  Serial1.begin(9600);
  //delay(2500);
  myDFPlayer.begin(Serial1, true);

  Serial.println(myDFPlayer.begin(Serial1));
  if(!myDFPlayer.begin(Serial1))
  {
   Serial.println("Problem");
   while (true);
  }

  if(myDFPlayer.begin(Serial1))
  {
    Serial.println("Good");
  }
}

void loop ()
{
  myDFPlayer.volume(50);
  myDFPlayer.play(1); // a brief track, but may drive you nuts
  //delay(5000);
}

That is just me being a nana, sorry

OK, so you have now added it? It's still not shown in post #30.

Assuming Yes.

Even with several in parallel, your 1k resistors won't be useful. If you have any other speaker just add that in series. I'm simply trying to rule out the longshot that a brief drop in voltage is causing the problem. Or try my independent supply suggestion, say with 3 x 1.5 V AA types.

Thank you !

I have updated the code according to the Wiki

#include "DFRobotDFPlayerMini.h"

DFRobotDFPlayerMini myDFPlayer;

void setup() 
{
  Serial.begin(9600);
  Serial1.begin(9600);
  delay(2500);
  myDFPlayer.begin(Serial1, true);

  Serial.println(myDFPlayer.begin(Serial1));
  if(!myDFPlayer.begin(Serial1))
  {
   Serial.println("Problem");
   while (true);
  }

  if(myDFPlayer.begin(Serial1))
  {
    Serial.println("Good");
     
  }
}

void loop ()
{

   myDFPlayer.volume(50);
   myDFPlayer.play(1);
   delay(5000);
   static unsigned long timer = millis();

  if (millis() - timer > 3000) {
    timer = millis();
   // myDFPlayer.next();  //Play next mp3 every 3 second.
  }

  if (myDFPlayer.available()) {
    printDetail(myDFPlayer.readType(), myDFPlayer.read()); //Print the detail message from DFPlayer to handle different errors and states.
  }
}

void printDetail(uint8_t type, int value){
  switch (type) {
    case TimeOut:
      Serial.println(F("Time Out!"));
      break;
    case WrongStack:
      Serial.println(F("Stack Wrong!"));
      break;
    case DFPlayerCardInserted:
      Serial.println(F("Card Inserted!"));
      break;
    case DFPlayerCardRemoved:
      Serial.println(F("Card Removed!"));
      break;
    case DFPlayerCardOnline:
      Serial.println(F("Card Online!"));
      break;
    case DFPlayerUSBInserted:
      Serial.println("USB Inserted!");
      break;
    case DFPlayerUSBRemoved:
      Serial.println("USB Removed!");
      break;
    case DFPlayerPlayFinished:
      Serial.print(F("Number:"));
      Serial.print(value);
      Serial.println(F(" Play Finished!"));
      break;
    case DFPlayerError:
      Serial.print(F("DFPlayerError:"));
      switch (value) {
        case Busy:
          Serial.println(F("Card not found"));
          break;
        case Sleeping:
          Serial.println(F("Sleeping"));
          break;
        case SerialWrongStack:
          Serial.println(F("Get Wrong Stack"));
          break;
        case CheckSumNotMatch:
          Serial.println(F("Check Sum Not Match"));
          break;
        case FileIndexOut:
          Serial.println(F("File Index Out of Bound"));
          break;
        case FileMismatch:
          Serial.println(F("Cannot Find File"));
          break;
        case Advertise:
          Serial.println(F("In Advertise"));
          break;
        default:
          break;
      }
      break;
    default:
      break;
  }


I get this as output

14:48:03.082 -> Good
14:48:08.566 -> Time Out!
14:48:13.571 -> Number:1 Play Finished!

The blue light on the player keeps flashing every 10 seconds ?

Valid values for volume are 0 - 30. (Maybe it will 'accept' 100, but it will not get any louder).

8 ohm speaker (anything more results lower volume/s).

My sketch, the loop(), just plays the track repeatedly. The delay() is necessary to allow it to play - otherwise it just keeps issuing a .play command (and that, rapidly). I don't know what's on the track you're trying to play - or how long it is.

Maybe you need to add a pushbutton (Push to Play) ?

The blue LED turns on when it is playing a Track (sound file).

(It looks like you have headed down the frantically cutting & pasting rabbit hole.)

Thank you, so it is playing the track I just cannot hear it ? The track is a woman counting in Zulu in English. It is very short, So the file might actually be playing .

You can copy and paste pictures into the text (reply) area.

These do have considerable volume, but that assumes a sound file recorded at a reasonable volume, too --

I was just hoping that the print details function would maybe give me some more debugging info. The time-out case in the switch seems to be real though.

This is what mine does:

What is the size of that microSD (it should not be more than 8GB)?

IT is 32GB FAT32, did I perhaps not understand the below correctly

I've demonstrated actual operation. The demo is with a Uno, but I assure you it's the same with the Mega (the sketch that I posted last night).
As I see it, you should work it out on the breadboard and then, once that's all figured out, you can transfer, incorporate, all of it to your blanket/doll (or whatever it is like).

Thank you @runaway_pancake , I will try purchase a smaller SDCard tomorrow.

? I use 16 and 32 GB mSDs regularly.

What is this meant to be?

That's not relevant to why this blarsted thing isn't a go.

I echo your sentiments on blarsted thing, it is driving me nuts.