Home Forums Sparkfun MP3 Shield Library Support Forum simple class error Reply To: simple class error

#2149

Strange. Please, note in the current example MP3Shield_Library_Demo.ino :


} else if(key_command == ‘O’) {
MP3player.end();
Serial.println(F(“VS10xx placed into low power reset mode.”));

Compiles just fine. Since your reported error did not error on the isPlaying, It sounds like the library you have linked to is prior to 1.01.00, when SFEMP3Shield::end() was added.

The SFEMP3Shield::end() function was created just for this; to save power. There is a low power soft mode, but the data sheet states the most power savings is done by putting the chip into reset. Which is what end() does. And you can come out of reset by re-initializing the VS1053 by calling SFEMP3Shield::vs_init(). No need to re-call SFEMP3Shield::begin() which only deals with the Arduino’s pins.

Hence the MP3Shield_Library_Demo.ino example has


} else if(key_command == ‘R’) {
    MP3player.stopTrack();
    MP3player.vs_init();
    Serial.println(F(“Reseting VS10xx chip”));