Serial.write(some_byte) writes a byte on the serial output. The
Arduino serial monitor tries to interpret the bytes it receives as text:
0x11is a control character, displayed as “□”0x22is the ASCII code for the double quote (")0x33is the ASCII code for the digit 3.0x44is the ASCII code for the uppercase letter “D”- etc.
Serial.write(some_byte) writes a byte on the serial output. The
Arduino serial monitor tries to interpret the bytes it receives as text:
0x11is a control character, displayed as “□”0x22is the ASCII code for the double quote (")0x33is the ASCII code for the digit 3.0x44is the ASCII code for the uppercase letter “D”- etc.
To store a 2 character string you need a 3 byte array, not a 2 byte array. This is because in C a string consists of the actual string data and a zero ("NULL") byte at the end to indicate where the end of the string is.
So you would need:
char Hex_Array[3];
so it can store, for the number 0x69: 69\0. Otherwise you overrun the array and corrupt other data that follows in the stack, and changing that other data corrupts your string by changing the "end of string" marker to some other random ASCII character.