from machine import Pin
from time import sleep
red=Pin(1,Pin.OUT)
green=Pin(3,Pin.OUT)
blue=Pin(4,Pin.OUT)
def coolore(r,b,g):
red.value(r)
blue.value(b)
green.value(g)
button=Pin(7,Pin.IN,Pin.PULL_DOWN)
while True:
if button.value ()==1:
coolore(1,1,0)
else:
coolore(0,1,0)
sleep(0.1)