Skip to content

Commit ea0cde2

Browse files
committed
Adding touch example.
1 parent 67c2353 commit ea0cde2

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • Rotary_Trinkey/CircuitPython_Cap_Touch_Example
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"""CircuitPython Capacitive Touch Example for Rotary Trinkey"""
2+
import time
3+
import board
4+
import touchio
5+
6+
touch = touchio.TouchIn(board.TOUCH)
7+
8+
while True:
9+
if touch.value:
10+
print("Pad touched!")
11+
time.sleep(0.1)

0 commit comments

Comments
 (0)