from machine import Pin
import time
led1=Pin(16,Pin.OUT)
led2=Pin(17,Pin.OUT)
led3=Pin(18,Pin.OUT)
led4=Pin(19,Pin.OUT)
sw1=Pin(12,Pin.IN)
sw2=Pin(13,Pin.IN)
led=[led1,led2,led3,led4]
while 1:
if sw1.value()==0: #0 because pull up
led1.on()
time.sleep_ms(50)
print("Switch Pressed,","LED On")
if sw2.value()==0:
led1.off()
time.sleep_ms(50)
print("Switch Released,","LED Off")