from machine import Pin
import time

# Define GPIO pins
led_pin = Pin(2, Pin.OUT)
switch_pin = Pin(14, Pin.IN)

# Main loop
while True:

    # initial state
    led_pin.off()
    
    # Read the state of the switch
    switch1_state = switch1_pin.value()
    
    # If the switch is ON, turn the LED ON, else turn it OFF
    if switch1_state == 1:
        led_pin1.on()    
        led_pin2.off()         
    
    # If the switch is ON, turn the LED ON, else turn it OFF
    if switch2_state == 1:
        led_pin1.off()    
        led_pin2.on()        
    
    # Delay for a short period
    time.sleep(0.1)