from machine import Pin
switch=Pin(3, Pin.IN, Pin.PULL_UP)
led=Pin(0, Pin.OUT)
while True:
if switch.value()==0:
led.high()
else:
led.low()
from machine import Pin
switch=Pin(3, Pin.IN, Pin.PULL_UP)
led=Pin(0, Pin.OUT)
while True:
if switch.value()==0:
led.high()
else:
led.low()