Skip to content

fixing printChar() so that shift functions can move characters printed by printChar #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/SparkFun_Alphanumeric_Display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -681,6 +687,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
Expand Down