Home Forums Sparkfun MP3 Shield Library Support Forum Help with mp3shield sensor trigger Reply To: Help with mp3shield sensor trigger

#2620

See https://gist.github.com/mpflaga/5569322

Signal only needs to be typed once and each digital read will over right its prior value. along with no need to compartmentalize as much.

note the use of

while(MP3player.isPlaying()) {
//wait until done playing
}

with out it you can attempt to play others, but will have an error as it is already playing. Note the commented out line of MP3player.stopTrack(); which will help that if you desire. which won’t work with the above while(MP3player.isPlaying()) as you wont’ get to it. So you have some choices.