Home › Forums › Sparkfun MP3 Shield Library Support Forum › Triggering mp3 file over serial › Reply To: Triggering mp3 file over serial
With the fileplayer.ino as is, one does not send “f track002.mp3”. Rather one sends a multi-digit enumeration of the filename as discovered by the List “l” command and the Inter-Character Timeout will delimit the command.
Enter 1-9,f,F,s,d,+,-,i,>,<,p,r,R,t,m,M,g,k,h,O,o,D,S,V,l,01-65534 :
[MPF, I sent “l” to List out directory]
Received command: l
Music Files found :
00001: DING.wav
00002: TRACK001.mp3
00003: TRACK002.mp3
Enter Index of File to play
Enter 1-9,f,F,s,d,+,-,i,>,<,p,r,R,t,m,M,g,k,h,O,o,D,S,V,l,01-65534 :
[MPF, I sent “003”, to play #3 file from above]
Index 00003: TRACK002.mp3
Playing filename: TRACK002.mp3
by:
Album:
[MPF, I sent “s” to stop it]
Received command: s
Stopping
Enter 1-9,f,F,s,d,+,-,i,>,<,p,r,R,t,m,M,g,k,h,O,o,D,S,V,l,01-65534 :
[MPF, I sent 002 to play #2]
Index 00002: TRACK001.mp3
Playing filename: TRACK001.mp3
by:
Album:
[MPF, I sent 001 to play file #1]
Index 00001: DING.wav
Playing filename: DING.wav
“f” will just simply play track001.mp3.