DFplayer MP3 player on a Mega Arduino

Hello to you,

First of all, I apologize in advance if I'm ignorant. I'm a beginner.
Essentially, I get inspired by pre-existing projects/codes that I adapt.

I wanted to test using an MP3 player on an Arduino Mega board.
I was inspired by this code: Arduino Mega 2560 and DFPlayer Mini - #8 by UptownKitten

The problem: I can't hear any music.

In the code, there is obviously a test to see if the MP3 player is properly connected. The problem is that I did some tests (unpluging the MP3 player, removing the SD card) and this test doesn't seem to work, as the monitor keeps telling me "DFPlayer Mini online."

So, I'm not sure my DFPlayer is working correctly.

What could be the source of the problem?

Thank you very much for your help!

Attached my connection and my code

#include <DFPlayerMini_Fast.h>

DFPlayerMini_Fast myMP3;
void printDetail(uint8_t type, int value);



void setup() {
  //Serial2.begin(9600);
  Serial.begin(9600);
  myMP3.begin(Serial2, true);


  Serial.println(F("Initializing DFPlayer..."));

  //Use softwareSerial to communicate with MP3
  Serial.println(myMP3.begin(Serial2));
  if (!myMP3.begin(Serial2)) {
    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);
  }
  if (myMP3.begin(Serial2)) {
    Serial.println(F("DFPlayer Mini online."));
  }


  //Set volume value (From 0 to 30)
  myMP3.volume(30);
    

    
}


void loop() {
myMP3.play(1);
}


Hello! Sorry for the late reply. I am glad you are inspired by what I did. It's nothing much. I figured out the problem a long time ago. And I will share it with you.
There is a multitude of issues that could go on: code, wiring, you name it! I will take a spin at your code (which I am assuming is part of mine (which is probably incorrect)), and will give you what I think is wrong. I will give you some options to try. I will even give you a new schematic/wiring diagram. I am much more skilled at the Arduino thing than I've ever been. Thanks for choosing me!
I will, again, look at everything and give you what I found.

Thanks again,

Austin

Email me at: uptownkitten453@gmail.com

P.S. I don't check the Arduino forum very often, so make sure to email me!

By the way, I think you'll need a separate 5V power supply. That's what I think you may have made an error on. (That's not on my schematic; I think).

And ignorance is not necessarily a bad thing. I was once a beginner at Arduino, too. Now, I am more... intermediate. I use datasheets and stuff, but in no way am I an advance person.

Hello UptownKitten !
Thanks for your reply.
Finally, my MP3 player works.
I use the DFRobotDFPlayerMini library.
I don't know why but it seems that the other library ( DFPlayerMini_Fast) doesn't work with my MP3 player.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.