from machine import Pin
led = Pin(5, Pin.OUT)
button = Pin(3, Pin.IN)
print("Click on the button")
while True:
if button.value():
led.value(1)
else:
led.value(0)
from machine import Pin
led = Pin(5, Pin.OUT)
button = Pin(3, Pin.IN)
print("Click on the button")
while True:
if button.value():
led.value(1)
else:
led.value(0)