# write a micro python program to read he touch value from gpio4
#every half second,and print the touch value on the shell window
from machine import TouchPad,Pin
from time import sleep
led=Pin(18,Pin.OUT)
switch=TouchPad(Pin(4,Pin.IN))
while True:
x=switch.read()
if x<400:
while True:
led.on()
sleep(1)
led.off()
sleep(1)
else:
led.off()