adding touchio example

adding touchio example for s3 reverse tft
This commit is contained in:
Liz 2023-03-01 14:09:58 -05:00
parent 498f3f0fb6
commit ac2641e279

View file

@ -0,0 +1,18 @@
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
CircuitPython Capacitive Two Touch Pin Example - Print to the serial console when a pin is touched.
"""
import time
import board
import touchio
touch_one = touchio.TouchIn(board.A4)
touch_two = touchio.TouchIn(board.A5)
while True:
if touch_one.value:
print("Pin one touched!")
if touch_two.value:
print("Pin two touched!")
time.sleep(0.1)