From b765f65d9c520a204cf7c620e5d0106dd7f08faf Mon Sep 17 00:00:00 2001 From: KemoNine Date: Mon, 7 Sep 2020 23:53:06 -0400 Subject: [PATCH] Add ring buffer for text display on LCD ; add some debug code to verify what keys are availble for use ; need to sort symbol key still --- serial_debugger.ino | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/serial_debugger.ino b/serial_debugger.ino index 4d86565..1ed617c 100644 --- a/serial_debugger.ino +++ b/serial_debugger.ino @@ -6,6 +6,7 @@ #include #include #include +#include // Debugging via serial monitor (don't turn this on unless you're hacking on the firmware code) #define DEBUG true @@ -22,6 +23,7 @@ Adafruit_ILI9341 tft(TFT_CS, TFT_DC); #include #define CHARS_HORIZONTAL 28 #define CHARS_ROWS 13 +CircularBuffer textBuffer; // Keyboard BBQ10Keyboard keyboard; @@ -106,6 +108,24 @@ void handlerKeyboard() { // Get keyboard event const BBQ10Keyboard::KeyEvent key = keyboard.keyEvent(); + char output[28]; + snprintf(output, 28, "key: '%c' (dec %d, hex %02x)", key.key, key.key, key.key); + for (int i=0; i