1
I need to create an array of bytes with the following content:
byte[] arr = new byte { 0x4f, 0x4e };
I happen to have the string "ON", where "O" = 4f in hexa and "N" = 4e
I have tried directly storing the hexa value in the byte array without the 0x, but when sending to the serial port that way, it doesn’t work, it has to be in the format 0x00.
How to convert string to hexadecimal array?
Perhaps the problem lies elsewhere.
– Maniero