AceSegment
0.7.0
A framework for rendering seven segment LED displays using the TM1637, MAX7219, HT16K33, or 74HC595 controller chips
|
25 #ifndef ACE_SEGMENT_PATTERN_WRITER_H
26 #define ACE_SEGMENT_PATTERN_WRITER_H
30 #include "../LedModule.h"
32 namespace ace_segment {
75 for (uint8_t i = 0; i < len; i++) {
91 for (uint8_t i = 0; i < len; i++) {
93 uint8_t pattern = pgm_read_byte(patterns + i);
118 for (uint8_t i = pos; i < mLedModule.
getNumDigits(); ++i) {
virtual uint8_t getPatternAt(uint8_t pos)=0
Get the led digit pattern at position pos.
LedModule & ledModule() const
Return the underlying LedModule.
void clear()
Clear the entire display.
void writePatternAt(uint8_t pos, uint8_t pattern)
Write the pattern for a given pos.
void writePatternsAt(uint8_t pos, const uint8_t patterns[], uint8_t len)
Write the array of patterns of length len, starting at pos.
General interface that represents a generic seven-segment LED module with multiple digits.
void writePatternsAt_P(uint8_t pos, const uint8_t patterns[], uint8_t len)
Write the array of patterns of length len, which are stored in flash memory through PROGMEM,...
PatternWriter(LedModule &ledModule)
Constructor.
uint8_t getNumDigits() const
Return the number of digits supported by this display instance.
void clearToEnd(uint8_t pos)
Clear the display from pos to the end.
virtual void setPatternAt(uint8_t pos, uint8_t pattern)=0
Set the led digit pattern at position pos.
uint8_t getNumDigits() const
Return the number of digits supported by this display instance.
void writeDecimalPointAt(uint8_t pos, bool state=true)
Write the decimal point for the pos.
Write LED segment patterns to the underlying LedModule.