Skip to content

Commit 9407dd8

Browse files
authored
Merge pull request #1564 from kattni/rotary-trinkey-template-examples
Adding touch example.
2 parents 67c2353 + ea0cde2 commit 9407dd8

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)