Connecting and Running a DFPlayer Mini on a Seeeduino XIAO

Hi, totally new to the Seeeduino XIAO board and was hoping to connect a DFPlayer Mini but using the code I normally use for Arduino I get this error - no matching function for call to ‘mp3_set_serial(Serial_&)’

This is required by the DFPLayer Mini Library to run and work correctly, I have tried Serial1 and that doesn’t work either.

Thanks in advance for any help

Please provide a link to the code.

Hi Baozhu, here is the example code from th DFPLayer Library which has the same line that won’t compile or upload.

#include <SoftwareSerial.h>
#include <DFPlayer_Mini_Mp3.h>

//
void setup () {
	Serial.begin (9600);
	mp3_set_serial (Serial);	//set Serial for DFPlayer-mini mp3 module 
	mp3_set_volume (15);
}


//
void loop () {        
	mp3_play (1);
	delay (6000);
	mp3_next ();
	delay (6000);
	mp3_prev ();
	delay (6000);
	mp3_play (4);
	delay (6000);
}

/*
   mp3_play ();		//start play
   mp3_play (5);	//play "mp3/0005.mp3"
   mp3_next ();		//play next 
   mp3_prev ();		//play previous
   mp3_set_volume (uint16_t volume);	//0~30
   mp3_set_EQ ();	//0~5
   mp3_pause ();
   mp3_stop ();
   void mp3_get_state (); 	//send get state command
   void mp3_get_volume (); 
   void mp3_get_u_sum (); 
   void mp3_get_tf_sum (); 
   void mp3_get_flash_sum (); 
   void mp3_get_tf_current (); 
   void mp3_get_u_current (); 
   void mp3_get_flash_current (); 
   void mp3_single_loop (boolean state);	//set single loop 
   void mp3_DAC (boolean state); 
   void mp3_random_play (); 
 */

Many thanks

Phil

You’ll need to use the new software, or ask DFRobot.

Many thanks, will download and give it a try.

Regards Philip Edwards

Hi, could you allready check? It is working?

Hi, yes I got it working by using the “DFPlayerMini_Fast” library.

Great! Can you please share the settings / connections? I’m getting cracy. It works for me with the Wemos ESP32 mini, but not with the Xiao ESP32S3.

These are the settings I use

#include “SoftwareSerial.h”
#include “DFRobotDFPlayerMini.h”

SoftwareSerial mySoftwareSerial(7, 6); // RX, TX
DFRobotDFPlayerMini myDFPlayer;

void setup() {

mySoftwareSerial.begin(9600);
Serial.begin(115200);

if (!myDFPlayer.begin(mySoftwareSerial)) { //Use softwareSerial to communicate with mp3.
while(true){
}
}

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

myDFPlayer.play (3);
delay (1500);

myDFPlayer.play (2);
delay (300);

}

Connections image:

Hi, I found now the Error in my connection…

Your Settings couldn’t work for a XIAO ESP32S3 !?! SoftwareSerial.h?

For me this setting are now running with your connection:

#include “Arduino.h”
#include “DFRobotDFPlayerMini.h”

#define FPSerial Serial1

DFRobotDFPlayerMini myDFPlayer;

void setup()
{

FPSerial.begin(9600, SERIAL_8N1, /rx =/44, /tx =/43);
Serial.begin(115200);

Serial.println();
Serial.println(F(“DFRobot DFPlayer Mini Demo”));

Serial.println(F(“Initializing DFPlayer … (May take 3~5 seconds)”));

if (!myDFPlayer.begin(FPSerial, /*isACK = */true, /*doReset = */true)) { //Use serial 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!"));

while(true){

  delay(0); // Code to compatible with ESP8266 watch dog.

}

}

Serial.println(F(“DFPlayer Mini online.”));