Closed quest2xcape closed 3 years ago
I might suspect it is something that was missed. From that I would suggest starting with something that works and either trim it down and then add what you want. A good starting place may be one of my GIST examples. There are quite a few, Where MP3random.ino https://gist.github.com/mpflaga/5800889 may be a good starting place, as it is very minimal.
I would also add that the IDE's library manager may have a more up to date version. Just enter vs1053 into the library managers filter.
Closing assuming the issue was self resovled.
I have an Uno with the Sparkfun MP3 player. It runs the library demo code fine, but when I run my own code it hangs on the first call to playTrack(1). It doesn't return an error code, it just simply hangs forever. I am using the same library and startup calls as the demo code, and successfully executes this segment of code in the setup() section of the code so I assume that the SPI is operation properly. MP3Player.setMonoMode(1); // set output to mono mode // Increase volume by 18dB (subtract 36 from current value) union twobyte volume; volume.word = MP3Player.getVolume(); Serial.print("Initial volume = "); Serial.println(volume.byte[1]); volume.byte[1] -= 36; MP3Player.setVolume(volume.byte[1],volume.byte[1]); Serial.print("New volume = "); Serial.println(volume.byte[1]);
In loop(), the first time I call playTrack(1), it never comes back. The same track plays perfectly in the demo code. Ideas?