Code: Select all
import board
from displayio import Group
from adafruit_clue import clue
from adafruit_display_text import label
from terminalio import FONT
class ColorTest:
labelText = None
def __init__(self):
self.labelText = label.Label(FONT, text="0")
self.labelText.scale = 5
self.labelText.x = self.labelText.y = 100
group = Group()
group.append(self.labelText)
board.DISPLAY.show(group)
def main(self):
while True:
if clue.touch_0: colorRead = clue.color
self.labelText.text = str(clue.proximity)
ColorTest().main()