Adafruit_Learning_System_Gu.../Slider_Trinkey/Capacitive_Touch/code.py
2022-02-22 15:50:12 -05:00

15 lines
328 B
Python

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