Bs2p output data format
robert hilton
Posts: 3
Bs2p outputs data in ascii format. How can i convert it into decimal format? Could any one help me out?
Comments
For example, we have the value, 1000, which is the hex value $03E8. So, that's two bytes. The high-byte, $03, and the lowbyte, $E8.
Now, if you put that out as an ascii string (SEROUT 16, 16486, [noparse][[/noparse]DEC Value]), you're going to see "1000" (4 bytes).
If you put that out as binary (SEROUT 16, 16468, [noparse][[/noparse]Value.HighByte, Value.LowByte]) you'll see the two bytes.
To convert to decimal -- if recieving with a C++ program on the PC -- I believe its an option in 'fscanf()'.
So, what language are you using?
And when you say "Decimal Format", what do you mean?
http://forums.parallax.com/showthread.php?p=604292
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com