from machine import Pin
from time import sleep
switch1 = Pin(1, Pin.IN)
switch2 = Pin(2, Pin.IN)
led = Pin(10,Pin.OUT)
while True:
sw1_state = switch1.value()
sw2_state = switch2.value()
print("swich 1 state: ",sw1_state)
print("swich 2 state: ",sw2_state)
if sw1_state==1:
ifsw2_state==2:
led.value(1)
led.value(0)
sleep(0.1)