I am using the Serial Connector Tutorial to build a plotting window. Works great except ... I don't think I am using GetBytes properly.
I thought the follow two snippets would give the same buf():
and
The second one gives what I expect, the first doesn't.
What am i doing wrong?
Barry
I thought the follow two snippets would give the same buf():
B4X:
Dim spts As String = "plot=0.9,0.6,0.3,0.1,0.2,0.3,0.4,0.5,0.6"
Dim buf() As Byte = spts.GetBytes
and
B4X:
Dim buf() As Byte = Array As Byte( _
0x70,0x6c,0x6f,0x74,0x3d,0x30,0x2e,0x39,0x2c,0x30, _
0x2e,0x36,0x2c,0x30,0x2e,0x33,0x2c,0x30,0x2e,0x31, _
0x2c,0x30,0x2e,0x32,0x2c,0x30,0x2e,0x33,0x2c,0x30, _
0x2e,0x34,0x2c,0x30,0x2e,0x35,0x2c,0x30,0x2e,0x36)
The second one gives what I expect, the first doesn't.
What am i doing wrong?
Barry