diff --git a/libraries/ESP32/examples/Serial/OnReceiveError_BREAK_Demo/OnReceiveError_BREAK_Demo.ino b/libraries/ESP32/examples/Serial/OnReceiveError_BREAK_Demo/OnReceiveError_BREAK_Demo.ino index fb7af04c5f5..209cf8922be 100644 --- a/libraries/ESP32/examples/Serial/OnReceiveError_BREAK_Demo/OnReceiveError_BREAK_Demo.ino +++ b/libraries/ESP32/examples/Serial/OnReceiveError_BREAK_Demo/OnReceiveError_BREAK_Demo.ino @@ -80,7 +80,11 @@ void onReceiveFunction() { received_bytes = received_bytes + available; Serial.printf("onReceive Callback:: There are %d bytes available: {", available); while (available--) { - Serial.print((char)Serial1.read()); + char c = Serial1.read(); + Serial.printf("0x%x='%c'", c, c); + if (available) { + Serial.print(" "); + } } Serial.println("}"); }