Author Options:

how to get current track name using breakout shield Answered

I am using the vs1053 breakout shield from adafruit that is hooked up to Arduino. I wanted to write an if statement that if the currentTrack name is not equal to the name i set it to then the code will restart the loop and they are not equal then it will play the song (this is so that every time the loop runs it won't replay the song if it is already playing ). Do you know how i would be able to get the name of the track that is playing using currentTrack? it is not very clear on how to use it in the library reference...also is there another easier way to do this? Thank you!

if (abs(newVector - storedVector) <= SLOW_THRESHOLD) {
Serial.println("MOVING SLOW!!");
trackName = "track001.mp3";
if (currentTrack==trackName) {
} else {


The forums are retiring in 2021 and are now closed for new topics and comments.

6 years ago

The arduino has no way of retrieving the name of an audio track. If all you want it to do is play a single song then get an MP3 Player Shield and load the song onto an SD card for the shield. Then the arduino can play the song any time you want based off any kind of input.