Adding touch example.
This commit is contained in:
parent
67c2353045
commit
ea0cde2ddf
1 changed files with 11 additions and 0 deletions
11
Rotary_Trinkey/CircuitPython_Cap_Touch_Example/code.py
Normal file
11
Rotary_Trinkey/CircuitPython_Cap_Touch_Example/code.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
"""CircuitPython Capacitive Touch Example for Rotary Trinkey"""
|
||||
import time
|
||||
import board
|
||||
import touchio
|
||||
|
||||
touch = touchio.TouchIn(board.TOUCH)
|
||||
|
||||
while True:
|
||||
if touch.value:
|
||||
print("Pad touched!")
|
||||
time.sleep(0.1)
|
||||
Loading…
Reference in a new issue