#code for control on board led using on board key
import machine
import time
led = machine.Pin(2, machine.Pin.OUT)
boot_key = machine.Pin(0, machine.Pin.IN)
while True:
if boot_key.value() == 0:
led.value(1)
else:
led.value(0)
time.sleep(0.1)