Merge pull request #72 from kattni/circuitpython-quick-start
Cap touch example
This commit is contained in:
commit
8d314142db
1 changed files with 10 additions and 0 deletions
10
CircuitPython_Quick_Starts/CircuitPython_CapTouch.py
Normal file
10
CircuitPython_Quick_Starts/CircuitPython_CapTouch.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import time
|
||||
import board
|
||||
import touchio
|
||||
|
||||
touch_A0 = touchio.TouchIn(board.A0) # Will not work on Circuit Playground Express!
|
||||
|
||||
while True:
|
||||
if touch_A0.value:
|
||||
print("Touched A0!")
|
||||
time.sleep(0.05)
|
||||
Loading…
Reference in a new issue