MP3 player program error uploading


Trying to upload this example program to my Uno IDE for my MP3-TF-16P player but keep getting DFRobotDFPlayerMimi.h: No such file or directory.
Any ideas on the problem greatly appreciated.


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

SoftwareSerial mySoftwareSerial(10, 11); // RX, TX
DFRobotDFPlayerMini myDFPlayer;
void printDetail(uint8_t type, int value);

void setup()

  Serial.println(F("DFRobot DFPlayer Mini Demo"));
  Serial.println(F("Initializing DFPlayer ... (May take 3~5 seconds)"));

  if (!myDFPlayer.begin(mySoftwareSerial)) {  //Use softwareSerial to communicate with mp3.
    Serial.println(F("Unable to begin:"));
    Serial.println(F("1.Please recheck the connection!"));
    Serial.println(F("2.Please insert the SD card!"));
  Serial.println(F("DFPlayer Mini online."));

  myDFPlayer.volume(10);  //Set volume value. From 0 to 30;  //Play the first mp3

void loop()
  static unsigned long timer = millis();

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

  if (myDFPlayer.available()) {
    printDetail(myDFPlayer.readType(),; //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!"));
    case WrongStack:
      Serial.println(F("Stack Wrong!"));
    case DFPlayerCardInserted:
      Serial.println(F("Card Inserted!"));
    case DFPlayerCardRemoved:
      Serial.println(F("Card Removed!"));
    case DFPlayerCardOnline:
      Serial.println(F("Card Online!"));
    case DFPlayerPlayFinished:
      Serial.println(F(" Play Finished!"));
    case DFPlayerError:
      switch (value) {
        case Busy:
          Serial.println(F("Card not found"));
        case Sleeping:
        case SerialWrongStack:
          Serial.println(F("Get Wrong Stack"));
        case CheckSumNotMatch:
          Serial.println(F("Check Sum Not Match"));
        case FileIndexOut:
          Serial.println(F("File Index Out of Bound"));
        case FileMismatch:
          Serial.println(F("Cannot Find File"));
        case Advertise:
          Serial.println(F("In Advertise"));

did you install that library?

Yes i did. Thanks
I tried several examples provided and all of them have the same problem or other issues.
For example another program rejects it and says "myserial1 does not name a type; did you mean serial1?"

I just tried the program you provided. Same problem.
Gotta be something simple on my end.

First of all, I will recommend you to focus on only one sketch for now. If you are switching from one sketch to another during the troubleshooting process that will introduce additional variables into the situation and lead to confusion. Once you have that first sketch working, you are welcome to try the other ones.

Once you have selected the sketch you want to focus on, try compiling it. If it works, then all is well. If not, then please do this:

  1. When you encounter an error, you'll see a button on the right side of the orange bar in the Arduino IDE: Copy error messages. Click that button.
  2. Open a forum reply here by clicking the Reply button.
  3. Click the </> icon on the post composer toolbar. This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  4. Press Ctrl+V. This will paste the compilation output into the code block.
  5. Move the cursor outside of the code block markup before you add any additional text to your reply.
  6. Click the Reply button to post the output.

Great. Thank you so much!! I was confused on how to do this.

Arduino: 1.8.16 (Windows Store (Windows 10), Board: "Arduino Uno"

In file included from C:\Users\kjame\Documents\Arduino\libraries\DFPlayerMini_Fast\examples\example\example.ino:1:0:

C:\Users\kjame\Documents\Arduino\libraries\DFPlayerMini_Fast\src/DFPlayerMini_Fast.h:22:10: fatal error: FireTimer.h: No such file or directory

 #include "FireTimer.h"


compilation terminated.

exit status 1

Error compiling for board Arduino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

When you see a "No such file or directory" error it almost always means you need to install the library that contains the missing file. That is the case here. You are probably already accustomed to needing to install the Arduino libraries your sketch uses. But in some cases those libraries also use other libraries. That is the case here. The "DFPlayerMini_Fast" library has a dependency on the "FireTimer" library so in order to use the "DFPlayerMini_Fast" library you must also install the "FireTimer" library. You can do that easily via the Arduino IDE's Library Manager:

  1. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE's menus.

  2. Wait for the update to finish.

  3. In the "Filter your search" field, type "FireTimer".

  4. Press Enter.

  5. Scroll down through the list of libraries until you see"FireTimer by PowerBroker2". Click on it.

  6. Click the Install button.

  7. You may now get a dialog asking:

    Would you like to install also all the missing dependencies?

    If so, click the Install all button.

  8. Wait for the installation to finish.

  9. Click the Close button.

Thank you! Thank you! Thank you!
It worked!!

I thought I knew how to do it.
Guess I'm the kind of guy that needs things explained step by step. line by line. nothing left out.

Cant thank you enough

You're welcome. I'm glad to hear it's working.

I also like to have detailed instructions to follow when I'm having trouble with something. When things aren't working correctly and I'm terribly confused, I don't want any ambiguity to leave me with doubts about whether I did things correctly.

For this reason, I always try to write instructions that don't leave any step out, no matter how trivial it might seem. My goal is that if someone follows the instructions exactly, they will always be guaranteed to have the expected result when they arrive at the last step.

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