A Class representing a TM1637 Seven-Segment Display connected to two Serial Wombat pins.
This class is only supported on the Serial Wombat SW18AB chip. It is not supported on the Serial Wombat 4X line.
This class controls a State Machine driven driver for a TM1637 Seven Segment LED Display.
Each instance of this class uses an average of approximately 5% of the SW18's processing time. This varies by configuration options and usage.
The Serial Wombat TM1637 driver can be configured in a number of ways: The Display shows the current value in Hex or decimal of a Pin's public data (including values written to the pin used to control the display) The Display shows an array of characters (as best they can be shown on a seven segment display) commanded by the host The Display shows raw 7-segment bitmaps commanded by the host The Display shows an animation downloaded to the Serial Wombat chip by the host.
See the available examples in the Arduino Library for usage.
Warning
Different TM1637 displays behave differently based on how the manufacturer routed the LED matrix pins to the TM1637 outputs on the PCB. This can cause digits to be displayed in the wrong order, or cause decimal points or clock colons to malfunction. This is a display issue, not an issue with this library or the Serial Wombat firmware. Display order issues can be corrected with the orderDigits() command.
Returns a negative error code if initialization failed.
Parameters
clkPin
The primary pin for this pin mode, the Serial Wombat pin connected to the clk pin of the TM1637
dioPin
The Serial Wombat pin connected to the DIO/data pin of the TM1637
digits
The number of digits in the display. This is used to optimze displays shorter than 6 digits
mode
The mode (decimal, hex, char array, raw or animation) of the display driver
dataSourcePin
if in decimal or hex mode, the pin from which the 16 bit data will be read. Set this to the clkPin setting if you want to be able to write 16 bit (5 digit) numbers using the SerialWombat.writePublicData() function. Numbers larger than 65535 must be written as strings using the Character Mode
Brightness
- a value from 0 (dimmest) to 7 (brightest) based on the TM1637 hardware. This scale is not linear.