Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (13 sloc) 411 Bytes
# CircuitPython Demo - Cap Touch Multiple Pins
# Example does NOT work with Trinket M0!
import time
import board
import touchio
touch_A1 = touchio.TouchIn(board.A1) # Not a touch pin on Trinket M0!
touch_A2 = touchio.TouchIn(board.A2) # Not a touch pin on Trinket M0!
while True:
if touch_A1.value:
print("Touched A1!")
if touch_A2.value:
print("Touched A2!")
You can’t perform that action at this time.