print("Press the KEY to TURN ON the LED")
from machine import Pin
from time import sleep
led1 = Pin(12,Pin.OUT)
key1 = Pin(14,Pin.IN,Pin.PULL_UP)
led2 = Pin(2,Pin.OUT)
key2 = Pin(4,Pin.IN,Pin.PULL_UP)
while True:
a = key1.value()
if( a == True):
led1.value(1)
else:
led1.value(0)
b = key2.value()
if(b == True):
led2.value(1)
else:
led2.value(0)