Hi!
I am using a MP3 shield VS1053 from geeetech. I am trying to implement this code, that is, when pressed "s" in the serial monitor, the music stops playing on the mp3 shield.
void parse_menu(byte key_command) {
if(key_command == 's') {
Serial.println(F("Stopping"));
MP3player.stopTrack();
}
}
I took this bit out of Sparkfun-MP3-Player-Shield-Arduino-Library/SFEMP3Shield/Examples/MP3Shield_Library_Demo at master · madsci1016/Sparkfun-MP3-Player-Shield-Arduino-Library · GitHub.
I have modified my code such that a button plays a track. However, I am trying to get it to stop when I press the key "s". Right now, it keeps playing the track until it is finished.
Help please?
Many thanks!