I am programming Arduino and I am trying to Serial.print() bytes in hexadecimal format \"the my way\" (keep reading for more information).
That is, by u
sorry - not enough reputation to comment but found previous answer is not fully correct. Actually, the nice light way to code it should be :
void p(byte X) { if (X < 10) {Serial.print("0");} ...
giving the code:
void p(byte X) {
if (X < 10) {Serial.print("0");}
Serial.println(X, HEX);
}
And in the main code:
p(byte1); // etc.
hope this helps