Abstraction of the 4 digit 7-segment display based on the TM1637
display driver. 7-bit ASCII characters are mapped as close as possible to
the 7 display segments. If a character cannot be mapped, the digit is
cleared.
|
__init__(self,
dio=38,
clk=40,
lum=4)
Creates a display instance that uses the two given GPIO pins for data
(dio, default: 38) and clock (clk, default: 40). |
source code
|
|
|
erase(self)
Clears the display (all digits are turned off). |
source code
|
|
|
show(self,
text,
pos=0)
Displays 4 characters of the given text. |
source code
|
|
|
scroll(self,
text)
Starts scrolling the text to the left and blocks until all characters
have passed by. |
source code
|
|
|
toRight(self)
Scrolls the current text one step to the left by decreasing the text
pointer. |
source code
|
|
|
toLeft(self)
Scrolls the current text one step to the left by increasing the text
pointer. |
source code
|
|
|
toStart(self)
Shows the text at the start position by setting the text pointer to
its start value. |
source code
|
|
|
|
|
|