20 lines
419 B
Python
20 lines
419 B
Python
import board
|
|
from adafruit_ht16k33.segments import Seg7x4
|
|
|
|
|
|
class Display:
|
|
"""Class for communicate with display"""
|
|
|
|
def __init__(self):
|
|
i2c = board.I2C()
|
|
self.display = Seg7x4(i2c)
|
|
|
|
self.display.brightness = 1
|
|
self.display.blink_rate = 0
|
|
|
|
def clear(self):
|
|
self.display.fill(0)
|
|
|
|
def print(self, value):
|
|
self.clear()
|
|
self.display.print(str(value))
|