Hi,
ive been searching and I can't find the exact answer. I need to construct a command string.
The following code sends numbers as ascii. for example the number 50 is sent as ascii '5' then ascii '0' as it would be typed on a keyboard. My question is how would I send byte values? so if i send 50, it sends the value 50 as 8 bit code. Are there other options besides "UTF8"?
thanks!
ive been searching and I can't find the exact answer. I need to construct a command string.
The following code sends numbers as ascii. for example the number 50 is sent as ascii '5' then ascii '0' as it would be typed on a keyboard. My question is how would I send byte values? so if i send 50, it sends the value 50 as 8 bit code. Are there other options besides "UTF8"?
B4X:
Dim sb As StringBuilder
Dim cmd_String As String
Dim buffer() As Byte
sb.Initialize
sb.append(A) .append(B) .append(C)
cmd_String = sb.ToString
buffer=cmd_String.GetBytes("UTF8")
AStream.Write(buffer)
End Sub
thanks!