How to define EQ with DFPlayerMini_fast

Hi all, I have a project using a DFPlayer Mini and the DFPlayerMini_fast library. I can't figure out how to write the code to change the EQ setting. In the code below, I have no idea what to put between the parentheses after myMP3.EQSelect.

When I type that, it autocompletes with "uint8_t setting" (see below code), but I don't know how to actually call the specific EQ setting. In the library, it says that the value that I want is "const uint8_t EQ_BASE", but when I replace the word "setting" in the code below with EQ_BASE, I get "Compilation error: expected primary-expression before 'EQ_BASE'". So what am I doing wrong? Thanks in advance.

#include <DFPlayerMini_Fast.h>
#include <ezButton.h>

ezButton button(4);
int last_button_state = HIGH;

#if !defined(UBRR1H)
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
#endif

DFPlayerMini_Fast myMP3;

void setup()
{
  Serial.begin(115200);

#if !defined(UBRR1H)
  mySerial.begin(9600);
  myMP3.begin(mySerial, true);
#else
  Serial1.begin(9600);
  myMP3.begin(Serial1, true);
#endif
  
  Serial.println("Setting volume to 20");
  myMP3.volume(20);
  myMP3.EQSelect(uint8_t setting)

}

void loop()
{
  button.loop();

  if (last_button_state == HIGH && button.getStateRaw() == LOW)
  {
    myMP3.play(1);
    last_button_state = LOW;
  }

  if (button.isReleased())
  {
    last_button_state = HIGH;
  }
}

It should be myMP3.EQSelect(2) for example. The function accepts the value from 0 to 5 inclusive.

1 Like

EQ(0/1/2/3/4/5)

0: Normal
1: Pop
2: Rock
3: Jazz
4: Classic
5: Base

Example:

myMP3.EQSelect(5)       // EQ: "Base"
1 Like

@flashko @uxomm Thank you!

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