Not really. The idea is to get an arbitrary 8 bit HEX sequence
into the Arduino from the "Serial Monitor".
Serial.print(myVar,HEX) prints a HEX value
out from the Arduino to another device.
I need to send HEX
into the Arduino from another device. In this case, my development computer using the Serial port via the "Serial Monitor". The Arduino reads it and takes action.
The Serial Monitor application
sends HEX (unsigned char) to the Arduino on the serial port and the Arduino reads it with Serial.read().
By way of illustration:
To embed HEX in a Visual Studio's C++ string you would use escape sequences.
https://msdn.microsoft.com/en-us/library/6aw8xdf2.aspx You embed a hex value in a string by using /xnnn in the string, where nnn is the hex literal value.
The string -> "This is a null /x000. This is a BELL /x007.\n"
Would ring a bell and print the phrase:
This is a null . This is a Bell.
>
or
/x022 /x048 /x069 /x021 /x022 would print "Hi!"
In the old VT100 days we could embed hex with ESC[000~ if I remember correctly.