Hi,
I'm a student and new with working on project using this DFPlayer and I have problem when working this project. When I'm trying to make the DFPlayer play selected file, its not working (literally didn't play any single files). This is the code I'm using
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
SoftwareSerial softwareSerial(10, 11); //RX || TX
DFRobotDFPlayerMini player;
void setup()
{
pinMode(2,INPUT);
player.volume(30);
softwareSerial.begin(9600);
player.begin(softwareSerial);
}
void loop()
{
if(digitalRead(2) == HIGH)
{
delay(3000); player.play(1);
}
}
But when I'm using player.next () like this one
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
SoftwareSerial softwareSerial(10, 11); //RX || TX
DFRobotDFPlayerMini player;
void setup()
{
pinMode(2,INPUT);
player.volume(30);
softwareSerial.begin(9600);
player.begin(softwareSerial);
}
void loop()
{
if(digitalRead(2) == HIGH)
{
delay(3000); player.next(); delay(200);
}
}
The DFPlayer is playing all files (every single one). Can someone help me solve this problem?
Thank you very much in advance and I truly appreciate your responses.
Note :
- the files is already 0001.mp3 and so on
- the files put in the one and only folder named mp3
- the SD Card already FAT32