New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.volume() doesn’t send data on first call unless debug interface is turned on #54
Comments
Actually, I can't even get the player to start playing if i have the If I set I tested this with the example sketch and I'm running into the same problem. Simply changing the |
Is it possible that I'm sending too many commands too quickly, and the debug information is slowing the Arduino down enough that the DFPlayer doesn't choke? I remember reading an older discussion here about the original library having delays to prevent the DFPlayer from getting overwhelmed. On a hunch, I decided to experiment with adding delays, and I was able to solve the problem with just one delay:
Those two functions are being called right after each other in the setup function. Does this sound plausible, and if so what is the best way to handle this issue? |
Hi @timdmackey ,
Hope it helps. Regards. |
Hi @timdmackey, Did you ever get a solution please? I've just started working with this library and cannot get the example.ino sketch working. One of the puzzles is that it does not respond to the reduction from 30 to 5 in the volume. Also, where is the 'debug' setting you mention? |
This is a really strange bug I'm experiencing. I have my code set up to read a potentiometer value for the volume. It checks the volume every x milliseconds in the
loop()
function, as well as one time immediately after the DFPlayer is initialized in thesetup()
function.For some reason, the initial volume setting doesn't occur unless I have the debug interface set to
true
when I initialize the DFPlayer. If it set it tofalse
, it stops working. Subsequent calls to thevolume()
command do work.Because I'm keeping track of the current volume and only sending
volume()
commands when the volume changes, the result is that the volume will be incorrect until I turn the potentiometer, at which point the player volume jumps to the correct setting. I confirmed that the code is being reached, because there I print a message to the Serial buffer in the lines immediately before and after thevolume()
call.The text was updated successfully, but these errors were encountered: