from machine import TouchPad, Pin
from time import sleep
led=Pin(2,Pin.IN)
while True:
touchPin=TouchPad(Pin(4,Pin.IN))
touchValue=touchPin.read()
if (touchPin < 250):
led.on()
else:
led.off()
sleep(0.5)
from machine import TouchPad, Pin
from time import sleep
led=Pin(2,Pin.IN)
while True:
touchPin=TouchPad(Pin(4,Pin.IN))
touchValue=touchPin.read()
if (touchPin < 250):
led.on()
else:
led.off()
sleep(0.5)