Hi everybody
I don't understand what is my mistake.
I write to native serial port 1 on Arduino Mega 2560 by this code:
The result in hex code is
It doesn't resemble to anything, apart CR/LF.
Probably the strings are not converted correctly in Array function?
Thank you for help
Regards
Mauro Zanin
I don't understand what is my mistake.
I write to native serial port 1 on Arduino Mega 2560 by this code:
B4X:
strx=Array As Byte( "PE",13,10)
Main.Serialnative1.WriteBytes(strx,0,4)
strx=Array As Byte("RD 0", 13,10)
Main.Serialnative1.WriteBytes(strx,0,6)
Main.Serialnative1.Flush
The result in hex code is
B4X:
00 0d 0a 46 00 0d 0a 00 0d 0a ...F......
It doesn't resemble to anything, apart CR/LF.
Probably the strings are not converted correctly in Array function?
Thank you for help
Regards
Mauro Zanin