# On-Board LED control using on-board key/switch.
from machine import Pin
from time import sleep
led = Pin(23,Pin.OUT)
key = Pin(14,Pin.IN)
while True:
x= key.value()
if x==1:
led.value(1)
else:
led.value(0)
# On-Board LED control using on-board key/switch.
from machine import Pin
from time import sleep
led = Pin(23,Pin.OUT)
key = Pin(14,Pin.IN)
while True:
x= key.value()
if x==1:
led.value(1)
else:
led.value(0)