DFPlayer Mini - Setting the Equalizer

Hello to all!

I have two problems with the same Sketch. I tried to do this on my own, but I have not found anything (that works) that answers my question, how do I adjust the “Equalizer” on a DFPlayer Mini? I copied the 0 – 5 list, and tried the code another person used on his program, but again, it didn’t make it through compilation.

I used the following program from a gentleman on YouTube. It’s the first one that works after I switched from a Pro Mini to a Nano;

#include "mp3tf16p.h"

MP3Player mp3(10,11);

void setup() {
 Serial.begin(9600);
 mp3.initialize();
 mp3.playTrackNumber(1, 30);
 delay(4500);
}

void loop() {
 mp3.playTrackNumber(2, 30);
 delay(4500);
}

The other problem I am having with this is the ‘void loop’ play. I want a breathing sound to play every 4 ½ seconds, put it’s coming out as if I were running a marathon! I am going to try a very short delay, like (50) and then try the regular delay at (4450), to see if that short pause puts things back on track!

I thank you in advance for any help that is provided!

See this page:

  • Find "serial contro cmdl"
  • Find 0x07 (equalizer) and the possible arguments

See this page:

  • Find "setup"
  • follow the sequence down to "equalizer"
  • See the choices in the arguments

¿Como es que?

Post the errors that you received.

Maybe add a "pause" to the end of the darth vader track so when it plays you get your effect.

Every time I add a line such as mymp3.Eq(2) or anything relating to setting the "EQ"

#include "mp3tf16p.h"

MP3Player mp3(10,11);

void setup() {
 Serial.begin(9600);
 mp3.initialize();
 mp3.EQ(2)  <----- RIGHT HERE
 mp3.playTrackNumber(1, 30);
 delay(4500);
}

void loop() {
 mp3.playTrackNumber(2, 30);
 delay(4500);
}

I get this message;

C:\Users\geojz\Documents\Arduino\Arduino File Library\Sound01_mar28b\Sound01_mar28b.ino: In function 'void setup()':
C:\Users\geojz\Documents\Arduino\Arduino File Library\Sound01_mar28b\Sound01_mar28b.ino:8:6: error: 'class MP3Player' has no member named 'EQ'
  mp3.EQ(2)
      ^~
exit status 1

Compilation error: 'class MP3Player' has no member named 'EQ'

OR THIS;

C:\Users\geojz\Documents\Arduino\Arduino File Library\Sound01_mar28b\Sound01_mar28b.ino: In function 'void setup()':
C:\Users\geojz\Documents\Arduino\Arduino File Library\Sound01_mar28b\Sound01_mar28b.ino:8:2: error: 'mymp3' was not declared in this scope
  mymp3.EQ(2)
  ^~~~~
C:\Users\geojz\Documents\Arduino\Arduino File Library\Sound01_mar28b\Sound01_mar28b.ino:8:2: note: suggested alternative: 'mp3'
  mymp3.EQ(2)
  ^~~~~
  mp3

exit status 1

Compilation error: 'mymp3' was not declared in this scope
...
How would I declare something to make it work? I tried the command lines and they don't work well with this either.

Try

setEQ(2);

dfplayer library, not mp3tf16p.h DFPlayer/src/DFPlayer.cpp at main · enjoyneering/DFPlayer · GitHub

Just a note, I saw someone using "mymp3" in their sketch while using an "EQ" command and when I changed the original sketch, the last error command stated that "mymp3" was not declared in the setup.

Try the DFRobotDFPlayerMini library.

Okay, here's a really stupid question! When I include a file, i.e.: #include "FileName" at the start of my sketch, is that file supposed to be in the folder with the sketch I'm working on? I finally got a sketch to compile with no errors that includes a working EQ. I am wondering if that's causing a problem I'm having making it work?

Here is what I have;

#include <DFRobotDFPlayerMini.h>
#include <SoftwareSerial.h>

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

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

myDFPlayer.volume(30); //Set Volume Value (0-30).
myDFPlayer.EQ(5); // Value (0-5).

void play(int fileNumber=01);
delay(4500);
}

void loop() {

void play(int fileNumber=02);
delay(50);
delay(4450);

}

And, what is the difference between "DFRobotDFPlayerMini.h" and <DFRobotDFPlayerMini.h> ?

Thanks again for any help that is provided!

Thanks for the heads up! I'll put those "included" files in the folder with the sketch to see if that helps me get everything going the way I would like it to.

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