from adafruit_pyportal import PyPortal from analogio import AnalogIn import board import time import adafruit_touchscreen touchscreen = adafruit_touchscreen.Touchscreen( board.TOUCH_YD, board.TOUCH_YU, board.TOUCH_XR, board.TOUCH_XL, calibration=((5200, 59000), (5800, 57000)), size=(480, 340), ) display = board.DISPLAY display.rotation = 270 light_sensor = AnalogIn(board.LIGHT) #pyportal = PyPortal() while True: light = light_sensor.value touch = touchscreen.touch_point if light>5000: print("Yikes! bright lights!!") else: print("That is nice") if touch: print(f"touch value {touch}") print(f"light sensor value is {light}") time.sleep(2)