TroubleshootingArduino

DFPlayer locks up, error codes "Get Wrong Stack", "Timeout!"

userHead Stephen.Kramer 2023-11-06 05:13:32 300 Views0 Replies

I am using a DFPlayer mini module in an arduino robot sketch.  I have the module soldered to a breadboard and I have both the RX and TX connected to my Arduino Due, and am using code from the “DFRobotDFPlayerMini” library examples to read info returned from the module.  The first time it plays a file it is played correctly (from Setup()), however when I request “readState” immediately afterward I get -1 returned and the error “Stack Wrong!”.  Subsequent requests to play individual files (in Loop()) are unsuccessful (nothing is played) and the error returned is “Time Out!”.  This is even if I try to play the same file that played successfully in Setup().

 

Can you please tell me what is the meaning of these errors “Stack Wrong!” and “Time Out!”  ?  What might be going wrong?  Any assistance would be greatly appreciated.

 

Also I found that sending the stop() command causes the sketch to pause for ~ a second and I have no idea how that is happening.