import utime
from machine import Pin
from time import sleep
sleep(0.1) # Wait for USB to become ready
btn = Pin(2, Pin.IN, Pin.PULL_UP)
led = Pin(16, Pin.OUT)
while True:
led.value(not btn.value())
sleep(0.2)
import utime
from machine import Pin
from time import sleep
sleep(0.1) # Wait for USB to become ready
btn = Pin(2, Pin.IN, Pin.PULL_UP)
led = Pin(16, Pin.OUT)
while True:
led.value(not btn.value())
sleep(0.2)