Skip to content

Commit 68113a1

Browse files
committed
Enhance serial output in loop function to display keyInfo[0] as character, number, and hex value
1 parent c0dd4c5 commit 68113a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tdeck/tdeck.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ void loop()
6969
if (keyInfo[0] != 0x00 || keyInfo[1] != 0x00 || keyInfo[2] != 0x00 || keyInfo[3] != 0x00 || keyInfo[4] != 0x00 || keyInfo[5] != 0x00)
7070
{
7171
Serial.print("char: ");
72-
Serial.println(keyInfo[0]);
72+
// print keyInfo[0] as a character, number and hex value
73+
Serial.print((char)keyInfo[0]);
74+
Serial.print(" ");
75+
Serial.print(keyInfo[0]);
76+
Serial.print(" 0x");
77+
Serial.println(keyInfo[0], HEX);
7378
Serial.print("alt: ");
7479
Serial.println(keyInfo[1]);
7580
Serial.print("ctrl: ");

0 commit comments

Comments
 (0)