Hi There,
I've been currently developing for the DFPlayer Mini in a PhD project and after doing some digging into these forums after some issues with sleep modes, I've found that the original library provided by the manufacturer isn't quite up to date.
Instead of throwing hardware at a software problem (by forgoing the sleep mode in favour of a high-side transistor switch to cut power when sleep was required), I have instead opted for using Power_Broker's excellent fast library.
However this has also caused some issues as my program employs significant use various specific commands within the original library. These however are either unavailable or not as simply accessed in the fast library and the example code (fast library) provided isn't as comprehensive as the examples in the original library.
To that end, I have taken the original "ReadValues" example code and modified it to reference the superior fast library. However, I have a few functions that I would like some advice on, to assist with my code's migration.
Is this a correct modification for the original .readType and .read commands?
printDetail(myDFPlayer.query(0x41), myDFPlayer.query(0x40)); //DFPlayerMini_Fast
//printDetail(myDFPlayer.readType(), myDFPlayer.read()); //DFRobotDFPlayerMini
And Is this a suitable replacement for checking .available in the fast library?
//if (myDFPlayer.available()) { //DFRobotDFPlayerMini
if (myDFPlayer.parseFeedback()) { //DFPlayerMini_Fast
I quite like the original printDetail function in this that example code (since I can prompt my own debug of the unit) and I've found it a bit difficult to recreate it in the new library. Likewise, it also gives me the ability to check if the unit is sleeping by checking when myDFPlayer.read() = 2
Any advice would be excellent, I have also attached my version of the ReadValues.ino which has been modified to be fully compliant with Power_Broker's library and once the above issues are clarified, hopefully this can be a useful addition to the documentation.
Cheers
ReadValues_Fast.ino (8.51 KB)