Code: Select all
from machine import TouchPad,Pin
from time import sleep
touchPins=[0, 2, 4, 12, 13,14, 15, 27, 32, 33]
t=[]
for pin in touchPins:
t.append(TouchPad(Pin(pin)))
while True:
for i in t:
try: print(i.read())
except Exception as e: print(type(e),e.args)
sleep(0.1)