from machine import *
r = Pin(0, Pin.OUT)
g = Pin(1, Pin.OUT)
b = Pin(2, Pin.OUT)
def set_rgb(x, y, z):
r.value(not x)
g.value(not y)
b.value(not z)
def rst_rgb():
r.off()
g.off()
b.off()
# The following code should be tested using the REPL.
# This is to demonstrate for creating colors:
set_rgb(1,0,0) # red
# set_rgb(0,1,0) # green
# set_rgb(0,0,1) # blue
# Or a combination of primary colors:
# set_rgb(1,1,0) # r + g = yellow
# set_rgb(0,1,1) # g + b = cyan
# set_rgb(1,0,1) # r + b = magenta
# set_rgb(1,1,1) # r+g+b = white