AceSegmentWriter
0.5
Write decimal numbers, hex numbers, temperature, clock digits, characters, and strings to seven segment LED modules
|
The CharWriter supports mapping of an 8-bit character set to segment patterns supported by LedModule. More...
#include <CharWriter.h>
Public Member Functions | |
CharWriter (PatternWriter< T_LED_MODULE > &patternWriter, const uint8_t charPatterns[]=kCharPatterns, uint8_t numChars=kNumCharPatterns) | |
Constructor. More... | |
T_LED_MODULE & | ledModule () |
Get the underlying LedModule. | |
PatternWriter< T_LED_MODULE > & | patternWriter () |
Get the underlying PatternWriter. | |
uint8_t | size () const |
Return the number of digits supported by this display instance. | |
uint8_t | getNumChars () const |
Get number of characters in current character set. | |
void | home () |
Set the cursor to the beginning. | |
void | writeChar (char c) |
Write the character at the specified position. | |
uint8_t | getPattern (char c) const |
Get segment pattern for character 'c'. | |
void | clear () |
Clear the entire display. | |
void | clearToEnd () |
Clear the display from pos to the end. | |
The CharWriter supports mapping of an 8-bit character set to segment patterns supported by LedModule.
By default, the ASCII characters (0-127) is provided, but can be overridden with a user-defined character set.
T_LED_MODULE | the class of the underlying LED Module, often LedModule but other classes with the same generic public methods can be substituted |
Definition at line 58 of file CharWriter.h.
|
inlineexplicit |
Constructor.
patternWriter | reference to PatternWriter<T_LED_MODULE> |
charPatterns | (optional) the font, consisting of an array of 7-segment character patterns in PROGMEM flash memory (default: a pre-defined font of 128 characters in the ASCII character set) |
numChars | (optional) number of characters in charPatterns, (default: 128) |
Definition at line 69 of file CharWriter.h.