DFRobot / DFRobotDFPlayerMini

Arduino library for DFPlayer
315 stars 130 forks source link

readState() return number of file and not state #59

Open pierrotm777 opened 3 months ago

pierrotm777 commented 3 months ago

hello,

I use your lib with success but the readState return file number and not state. I use a Pro Micro. My code is: void readSettingsDFP() { PRINT_P("\r\n"); //PRINT_P("***************************\r\n"); PRINT_P("* oO DFPlayer Settings Oo *\r\n"); //PRINT_P("***************************\r\n"); PRINTF("State : %d\r\n",myDFPlayer.readState()); //read mp3 state PRINTF("Volume : %d\r\n",myDFPlayer.readVolume()); //read current volume Equalizer = myDFPlayer.readEQ(); //read EQ setting PRINTF("Equalizer: %s\r\n",EQ_STR[ms.EQ_MODE]); PRINTF("Files found: %d\r\n",myDFPlayer.readFileCounts());//read number of files PRINTF("Current sound: %d\r\n",myDFPlayer.readCurrentFileNumber(2)); }

Result: * oO DFPlayer Settings Oo * State : 19 Volume : 2 Equalizer: NORMAL Files found: 0 Current sound: 19

Thanks for your help,

Pierre

pierrotm777 commented 3 months ago

isACK = false solve the issue