Adafruit_Learning_System_Gu.../NeoKey_Trinkey/CircuitPython_Touch_Example/code.py
2022-02-23 13:49:59 -05:00

15 lines
310 B
Python

# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""NeoKey Trinkey Capacitive Touch Example"""
import time
import board
import touchio
touch = touchio.TouchIn(board.TOUCH)
while True:
if touch.value:
print("Pad touched!")
time.sleep(0.1)