hello, I'm trying to use a dfplayer mini module to play some .mp3 audio, I have an Arduino Leonardo connected through the Serial1 port with rx-tx cross communication, external power supply (5V 1,55A) and headphones, but I can't get more than beeps and screeches out of the module, Does anyone know what could be going on???
Could be your code that you forgot to post.
Or possibly an issue with your circuit... but you also forgot to post a schematic or diagram.
Wild guess... Do you have common GND between the device and the Arduino?
No, the source is common, it feeds both equipment correctly.
The circuit schematic is this:
https://images.app.goo.gl/b2ywzbfkZC9DXXK98
The code that is in the Arduino Leonardo is this:
//#include <SoftwareSerial.h>
#include <DFPlayer_Mini_Mp3.h>
//SoftwareSerial DFPlayerSerial(10, 11); // RX, TX
#define DFPlayerSerial Serial1
/*
mp3_play(); //start play
mp3_play(5); //play "mp3/0005.mp3"
mp3_pause();
mp3_stop();
mp3_next();
mp3_prev();
mp3_set_volume(uint16_t volume); //0~30
mp3_set_EQ(); //0~5
void mp3_single_loop(boolean state); //set single loop
void mp3_random_play();
*/
void setup()
{
Serial.begin(9600);
DFPlayerSerial.begin(9600);
mp3_set_serial(DFPlayerSerial);
mp3_set_volume(15);
}
void loop()
{
mp3_play(1);
delay(6000);
mp3_next();
delay(6000);
mp3_prev();
delay(6000);
mp3_play(4);
delay(6000);
}
I have 4 .mp3 with the nomenclature 0001.mp3 - 0004.mp3 in the root of the micro SD, which is in FAT32 format, and without label
forget about Leonardo, can you make it play by using IO/AdKey pins functionality?
no, I haven't tried it, but, in my application it has to be through rx-tx, although tomorrow I can try it, but I don't quite understand how it works
You can control the board manually, if it plays fine controlling it manually then the problem is in your sketch, if it doesn't play fine then the problem elsewhere
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.