The character is coming in some UTF8 format! Does someone knows how to handle this type?
The character is coming in some UTF8 format! Does someone knows how to handle this type?
Ok, here is the update. The serialMon pic is attached. The first HEX code is when I receive a '4' and the second is when I receive 'a'.
I tried modifying the code and a few versions of it actually, but nothing worked. How do I capture the value coming as in the pic attached.
My attempts were:
1) b0...b4 var byte
Debugin [B0,skip 1,B1,skip 1,b2,skip 1,b3,skip 1,b4]
DIDN'T worked
2) B0,B1 Var word : B2 var byte
Debugin [B0,B1,B2]
DIDN'T worked
Any further pointers please?
Hi,
34 is the ASCII code (in HEX) for '4' and 61 is the ASCII code (in HEX) for 'a' so the actual data you want to capture is the fifth byte in the received packet. How aboutorCode:DEBUGIN[WAIT (1), B0] ' Wait for the 01 part of the string then grab the next byte/Henrik.Code:DEBUGIN[SKIP 4, B0] ' Skip the first four bytes, grab the fifth.
EDIT: Or, if it's actually the 01 part you want to capture (and it's NOT the ASCII code for the digit 1 by the way) then perhaps DEBUGIN[SKIP 3, B0]
Last edited by HenrikOlsson; - 4th June 2013 at 07:03.
Bookmarks