from machine import Pin
led = Pin(5, Pin.OUT)
on_button = Pin(28, Pin.IN, Pin.PULL_DOWN)
off_button = Pin(18, Pin.IN, Pin.PULL_DOWN)
while True:
if on_button.value():
led.on()
if off_button.value():
led.off()Loading
pi-pico-w
pi-pico-w