import time
from machine import Pin, ADC, PWM
time.sleep(0.1) # Wait for USB to become ready
Red = Pin(0, Pin.OUT)
Green = Pin(1, Pin.OUT)
Blue = Pin(2, Pin.OUT)
RedPB = Pin(6, Pin.IN, Pin.PULL_DOWN)
GreenPB = Pin(7, Pin.IN, Pin.PULL_DOWN)
BluePB = Pin(8, Pin.IN, Pin.PULL_DOWN)
frequency = 10000
# led_pwm = PWM(Pin(4))
# led_pwm.freq(frequency)
while True:
#print("Red=", Red.value())
#print("Green=", Green.value())
#print("Blue=", Blue.value())
#print("Red PB Value=", RedPB.value())
Red.value(RedPB.value())
Green.value(GreenPB.value())
Blue.value(BluePB.value())
#slider = ADC(Pin(27, mode=Pin.IN))
#print("slider =", slider.read_u16())
#led_pwm.duty_u16(slider.read_u16())
#print("LED=", led_pwm.duty_u16())
time.sleep(.1)