from machine import Pin
import time
button = Pin(2,Pin.IN,Pin.PULL_DOWN)
led = Pin(0, Pin.OUT)
while True:
if button.value():
led.toggle()
time.sleep(.1)from machine import Pin
import time
button = Pin(2,Pin.IN,Pin.PULL_DOWN)
led = Pin(0, Pin.OUT)
while True:
if button.value():
led.toggle()
time.sleep(.1)