import machine
led = machine.Pin(9, machine.Pin.OUT)
button = machine.Pin(16, machine.Pin.OUT)
while True:
if button.value() == 1:
led.value(1)
if button.value() == 0:
led.value(0)
import machine
led = machine.Pin(9, machine.Pin.OUT)
button = machine.Pin(16, machine.Pin.OUT)
while True:
if button.value() == 1:
led.value(1)
if button.value() == 0:
led.value(0)