We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 498f3f0 + ac2641e commit f0771c1Copy full SHA for f0771c1
Feather_ESP32-S3_Reverse_TFT_Primary_Guide/CircuitPython_CapTouch/code.py
@@ -0,0 +1,18 @@
1
+# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
2
+# SPDX-License-Identifier: MIT
3
+"""
4
+CircuitPython Capacitive Two Touch Pin Example - Print to the serial console when a pin is touched.
5
6
+import time
7
+import board
8
+import touchio
9
+
10
+touch_one = touchio.TouchIn(board.A4)
11
+touch_two = touchio.TouchIn(board.A5)
12
13
+while True:
14
+ if touch_one.value:
15
+ print("Pin one touched!")
16
+ if touch_two.value:
17
+ print("Pin two touched!")
18
+ time.sleep(0.1)
0 commit comments