Bs2 send ASCII code to play mp3 file
Luis_P
Posts: 246
Dear friends,
I forgot how to do this! using the Bs2 SEROUT commands to play my mp3 module that accepts serial control mode.
To play an specific file example song 00001.mp3
ASCII codes:
Start code: 7E
Data length: 07
Operation code: A0
Ten thousands digit: 30H
Thousands digit: 30H
Hundreds digit: 30H
Tens digit:30H
Units digit: 31H
End code: 7E
I tried:
SEROUT 1, 9600, ["7E", "07", "A0", "30", "30", "30", "30", "31", "7E"]
doesn't work! 42242.pdf
I forgot how to do this! using the Bs2 SEROUT commands to play my mp3 module that accepts serial control mode.
To play an specific file example song 00001.mp3
ASCII codes:
Start code: 7E
Data length: 07
Operation code: A0
Ten thousands digit: 30H
Thousands digit: 30H
Hundreds digit: 30H
Tens digit:30H
Units digit: 31H
End code: 7E
I tried:
SEROUT 1, 9600, ["7E", "07", "A0", "30", "30", "30", "30", "31", "7E"]
doesn't work! 42242.pdf
Comments
SEROUT <pin>,<Baud>, [ $7E, 7, $A0, DEC5 1, $7E]
Read the chapter on the SEROUT statement and Appendix C of the BASIC Stamp Syntax and Reference Manual to get a better understanding of how this statement works and what the various items like DEC5 do. Also remember that you can't just put the Baud into the SEROUT statement. The 2nd parameter is more complex than that and is explained thoroughly in that chapter.