from machine import Pin
from time import sleep
sw=Pin(13,Pin.IN,Pin.PULL_DOWN)
orange=Pin(21,Pin.OUT)
green=Pin(18,Pin.OUT)
blue=Pin(16,Pin.OUT)
while True:
if sw.value()==1:
orange.on()
else:
orange.off()from machine import Pin
from time import sleep
sw=Pin(13,Pin.IN,Pin.PULL_DOWN)
orange=Pin(21,Pin.OUT)
green=Pin(18,Pin.OUT)
blue=Pin(16,Pin.OUT)
while True:
if sw.value()==1:
orange.on()
else:
orange.off()