DFPlayerMini_Fast
DFPlayerMini_Fast copied to clipboard
No Way To Tell If Command Is Finished
Hi, a really useful feature would be a way to tell when a Query/Command is finished, since it throws and error when a command is not finished and another is requested.
Hi, a query is finnished when the function returns so you receive an result. Some modules support waiting until the command has been finished.
I wrote a little function which will wait until the player is in idle mode (value 0) or while it is playing (value 2).
void waitForDFPlayer()
{
int16_t playerStatus = -1;
while( ( playerStatus != 0 ) && ( playerStatus != 2 ) )
{
playerStatus = myMP3.query( dfplayer::GET_STATUS_ );
delay( 100 );
}
} // void waitForDFPlayer()