Hi!
Can someone please tell me how to send 2 digit hex values using a variable in the Serout2 command?
I am sending file playing commands to a serial MP3 module. There are only 12 tracks. The select case code I show works but I am sure I can achieve the same thing if I can specify the format of the variable "Demo" using Serout2 . Demo is a variable that contains decimal 1 to 12 and I want to send the equivalent of Serout2 MP3data,188,[$01], Serout2 MP3data,188,[$02], Serout2 MP3data,188,[$03], etc. I need 2 hex digits to be sent.
Will this "Serout2 MP3data,188,[Hex2 Demo]" give me the same results as my select case code or do I need to use this;
"Serout2 MP3data,188,[IHex2 Demo]"
I don't have the parts to test anything until Monday but the select case code I tested before.
Thanks for any advice.
The code below works;
'Select Case Demo
case 1
Serout2 MP3data,188,[$01]
case 2
Serout2 MP3data,188,[$02]
case 3
Serout2 MP3data,188,[$03]
case 4
Serout2 MP3data,188,[$04]
case 5
Serout2 MP3data,188,[$05]
case 6
Serout2 MP3data,188,[$06]
case 7
Serout2 MP3data,188,[$07]
case 8
Serout2 MP3data,188,[$08]
case 9
Serout2 MP3data,188,[$09]
case 10
Serout2 MP3data,188,[$0A]
case 11
Serout2 MP3data,188,[$0B]
case 12
Serout2 MP3data,188,[$0C]
end select
Bookmarks