GolamMostafa:
But, 0xB0 is a code that puts a non-friendly character on the Serial Monitor. Serial Monitor is a human-friendly display unit, and it always expects characters/codes within ASCII boundary. Therefore, we have to execute the following codes to see exactly B0 on the Serial Monitor.byte x1 = 0xB0;
byte x2 = (x1 >> 4) + 0x37;
x1 = (x1 & 0x0F) + 0x30;
Serial.write(x2);
Serial.write(x1);
if you wanted to view it in serial monitor probably easier to use Serial.print as that would do the ASCII conversion for you!
Serial.write is useful where want to output the raw byte not the ASCII equivalent which i believe is the OP intent