from machine import Pin
from time import sleep
#define switches
switch1 = Pin(2,Pin.IN)
switch2 = Pin(3,Pin.IN)
#define led as output
led = Pin(14.Pin.OUT)
while True:
sw1_state= switch1.value()
sw2_State= switch2.value()
print("Switch 1 value : ",sw1_state)
print("Switch 2 value : ",sw2_state)
if sw1_state==1:
if sw2_state==1:
led.value(1)
led.value(0)
sleep(0.1)