from machine import Pin
from time import sleep
switch=Pin(1,Pin.IN)
led=Pin(4,Pin.OUT)
while True:
s1=switch.value()
print("Switch value",s1)
led.value(s1)
from machine import Pin
from time import sleep
switch=Pin(1,Pin.IN)
led=Pin(4,Pin.OUT)
while True:
s1=switch.value()
print("Switch value",s1)
led.value(s1)