AceSegment
0.7.0
A framework for rendering seven segment LED displays using the TM1637, MAX7219, HT16K33, or 74HC595 controller chips
|
An implementation of LedModule whose segment and digit pins are directly connected to the GPIO pins of the microcontroller. More...
#include <DirectFast4Module.h>
Public Member Functions | |
DirectFast4Module (uint8_t segmentOnPattern, uint8_t digitOnPattern, uint8_t framesPerSecond) | |
void | begin () |
void | end () |
![]() | |
ScanningModule (const LedMatrixDirectFast4< e0, e1, e2, e3, e4, e5, e6, e7, g0, g1, g2, g3 > &ledMatrix, uint8_t framesPerSecond) | |
Constructor. More... | |
void | begin () |
Configure the driver with the parameters given by in the constructor. More... | |
void | end () |
A no-op end() function for consistency with other classes. | |
uint8_t | getNumDigits () const |
Get the number of digits. | |
void | setPatternAt (uint8_t pos, uint8_t pattern) override |
Set the led digit pattern at position pos. | |
uint8_t | getPatternAt (uint8_t pos) override |
Get the led digit pattern at position pos. | |
void | setBrightness (uint8_t brightness) override |
void | setBrightnessAt (uint8_t pos, uint8_t brightness) |
Set the brightness for a given pos, leaving pattern unchanged. More... | |
uint16_t | getFramesPerSecond () const |
Return the requested frames per second. | |
uint16_t | getFieldsPerSecond () const |
Return the fields per second. | |
uint16_t | getFieldsPerFrame () const |
Total fields per frame across all digits. | |
uint16_t | getMicrosPerField () const |
Return micros per field. More... | |
bool | renderFieldWhenReady () |
Display one field of a frame when the time is right. More... | |
void | renderFieldNow () |
Render the current field immediately. More... | |
![]() | |
LedModule (uint8_t numDigits) | |
Constructor. More... | |
uint8_t | getNumDigits () const |
Return the number of digits supported by this display instance. More... | |
An implementation of LedModule whose segment and digit pins are directly connected to the GPIO pins of the microcontroller.
This is a convenience class that pairs together a ScanningModule and a LedMatrixDirectFast4 in a single class. For ease of use, this class assumes that the number of segments is always 8 and the number of digits is always 4.
eX | element (segment) pin numbers |
gX | group (digit) pin numbers |
T_DIGITS | number of digits in the LED module |
T_SUBFIELDS | number of subfields for each digit to get brightness control using PWM. The default is 1, but can be set to greater than 1 to get brightness control. |
T_CI | class that provides access to Arduino clock functions (millis() and micros()). The default is ClockInterface. |
T_GPIOI | (optional) class that provides access to the GPIO pins, default is GpioInterface (note: 'GPI' is already taken on ESP8266) |
Definition at line 60 of file DirectFast4Module.h.