diff --git a/Feather_ESP32-S3_Reverse_TFT_Primary_Guide/CircuitPython_CapTouch/code.py b/Feather_ESP32-S3_Reverse_TFT_Primary_Guide/CircuitPython_CapTouch/code.py new file mode 100644 index 000000000..0ed5f4739 --- /dev/null +++ b/Feather_ESP32-S3_Reverse_TFT_Primary_Guide/CircuitPython_CapTouch/code.py @@ -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)