from machine import Pin
import time
sw=Pin(4,Pin.IN)
while True:
b=sw.value()
print("Switch status :",b)
time.sleep(0.5)
from machine import Pin
import time
sw=Pin(4,Pin.IN)
while True:
b=sw.value()
print("Switch status :",b)
time.sleep(0.5)