I've modified the SerialTermial example to parse the data, convert it to a bytes array and send it.
bit is a Bitwise object.
The complete source code is attached.
B4X:
Sub btnSend_Click
strings() = StrSplit(textBox1.Text," ")
Dim data(ArrayLen(strings())) As byte
For i = 0 To ArrayLen(strings())-1
data(i) = bit.HexToDec(strings(i))
Next
If serial.PortOpen = true Then serial.Output2(data())
End Sub
I've modified the SerialTermial example to parse the data, convert it to a bytes array and send it.
bit is a Bitwise object.
The complete source code is attached.
B4X:
Sub btnSend_Click
strings() = StrSplit(textBox1.Text," ")
Dim data(ArrayLen(strings())) As byte
For i = 0 To ArrayLen(strings())-1
data(i) = bit.HexToDec(strings(i))
Next
If serial.PortOpen = true Then serial.Output2(data())
End Sub