I am programming Arduino and I am trying to Serial.print() bytes in hexadecimal format \"the my way\" (keep reading for more information).
Serial.print()
That is, by u
The lowest footprint in Memory, Code and runtime would be classic bit playing
byte b; Serial.print(b>>4, HEX); Serial.print(b&0x0F,HEX);
Which is working fine on any 8bit type. For any other mask also the first line to
Serial.print((b>>4)&0x0F, HEX);