PRJ - Print Format#
2024-05-29
// [How to print hex starts with 0x0x in 2 digits.](https://forum.arduino.cc/t/how-to-print-hex-starts-with-0x0x-in-2-digits/83357/5)
void setup() {
// put your setup code here, to run once:
char buffer[2];
byte d = 0x0a;
sprintf(buffer, "%02x", d);
Serial.begin(9600);
delay(1000);
Serial.println(buffer);
}
void loop() {
// put your main code here, to run repeatedly:
}