from time import sleep
from machine import Pin
SWTR=Pin(3,Pin.IN,Pin.PULL_DOWN)
SWTG=Pin(4,Pin.IN,Pin.PULL_DOWN)
SWTB=Pin(5,Pin.IN,Pin.PULL_DOWN)
red=Pin(2,Pin.OUT)
green=Pin(3,Pin.OUT)
blue=Pin(4,Pin.OUT)
while True:
v1=SWTR.value()
v2=SWTG.value()
v3=SWTB.value()
if(v1==1):
red.on()
sleep(0.1)
elif(v2==1):
green.on()
sleep(0.1)
elif(v3=1):
blue.on()
sleep(0.1)