From b294a1cba55e33600865ba1130f6d4fdf7e940d5 Mon Sep 17 00:00:00 2001 From: Cameron Huneke Date: Mon, 30 Jun 2025 18:49:22 -0400 Subject: [PATCH 1/2] added line to printChar() to allow shift functions to work on characters printed with printChar() --- src/SparkFun_Alphanumeric_Display.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SparkFun_Alphanumeric_Display.cpp b/src/SparkFun_Alphanumeric_Display.cpp index a4df114..cd85548 100644 --- a/src/SparkFun_Alphanumeric_Display.cpp +++ b/src/SparkFun_Alphanumeric_Display.cpp @@ -681,6 +681,9 @@ void HT16K33::printChar(uint8_t displayChar, uint8_t digit) uint16_t segmentsToTurnOn = getSegmentsToTurnOn(characterPosition); illuminateChar(segmentsToTurnOn, digit); + + // Add char to local RAM to enable shiftRight() and shiftLeft() + displayContent[digit] = displayChar; } // Update the list to define a new segments display for a particular character From 3ddd9e136c49f94d0dbf0826623097c4581864eb Mon Sep 17 00:00:00 2001 From: Cameron Huneke Date: Tue, 1 Jul 2025 19:46:27 -0400 Subject: [PATCH 2/2] Added a for loop to clear() to wipe the displayContent array --- src/SparkFun_Alphanumeric_Display.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/SparkFun_Alphanumeric_Display.cpp b/src/SparkFun_Alphanumeric_Display.cpp index cd85548..58fae7d 100644 --- a/src/SparkFun_Alphanumeric_Display.cpp +++ b/src/SparkFun_Alphanumeric_Display.cpp @@ -331,6 +331,12 @@ bool HT16K33::clear() // Clear the displayRAM array for (uint8_t i = 0; i < 16 * numberOfDisplays; i++) displayRAM[i] = 0; + + // Clear the displayContent array + for (uint8_t i = 0; i < 16; i++) + { + displayContent[i] = ""; + } digitPosition = 0;