AceSegmentWriter
0.4
Write decimal numbers, hex numbers, temperature, clock digits, characters, and strings to seven segment LED modules
|
Write LED segment patterns to the underlying LedModule. More...
#include <PatternWriter.h>
Public Member Functions | |
PatternWriter (T_LED_MODULE &ledModule) | |
Constructor. More... | |
T_LED_MODULE & | ledModule () const |
Return the underlying LedModule. | |
uint8_t | size () const |
Return the number of digits supported by this display instance. | |
void | home () |
Set the cursor to the beginning. | |
uint8_t | pos () const |
Return the current cursor position. | |
void | pos (uint8_t pos) |
Set the current cursor position. | |
void | writePattern (uint8_t pattern) |
Write pattern at the current cursor. | |
void | writePatterns (const uint8_t patterns[], uint8_t len) |
Write the array patterns[] of length len to the led module. | |
void | writePatterns_P (const uint8_t patterns[], uint8_t len) |
Write the array patterns[] of length len to the led module. More... | |
void | setDecimalPointAt (uint8_t pos, bool state=true) |
Write the decimal point for the pos. More... | |
void | clear () |
Clear the entire display. | |
void | clearToEnd () |
Clear the display from pos to the end. | |
Write LED segment patterns to the underlying LedModule.
Other 'Writer' classes provide additional functionality on top of this class (e.g. NumberWriter, ClockWriter, TemperatureWriter, CharWriter, StringWriter).
This class is stateless and does not contain any virtual functions. If the method calls are made on the PatternWriter object directly, the compiler can optimize away the indirection and call LedModule methods directly.
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 108 of file PatternWriter.h.
|
inlineexplicit |
Constructor.
ledModule | an instance of LedModule or one of its subclasses |
Definition at line 114 of file PatternWriter.h.
|
inline |
Write the decimal point for the pos.
Clock LED modules will attach the colon segment to one of the decimal points.
Definition at line 167 of file PatternWriter.h.
|
inline |
Write the array patterns[]
of length len
to the led module.
The patterns[]
is stored in PROGMEM flash memory.
Definition at line 154 of file PatternWriter.h.