code.py
1 # SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries 2 # 3 # SPDX-License-Identifier: MIT 4 5 """CircuitPython Capacitive Touch Example for Rotary Trinkey""" 6 import time 7 import board 8 import touchio 9 10 touch = touchio.TouchIn(board.TOUCH) 11 12 while True: 13 if touch.value: 14 print("Pad touched!") 15 time.sleep(0.1)