from machine import *
from utime import *
from neopixel import *
np = NeoPixel(Pin(23),16)
adc = ADC(Pin(34))
cw = ADC(Pin(35))
adc.atten(ADC.ATTN_11DB)
cw.atten(ADC.ATTN_11DB)
while True:
brightness = adc.read() // 16
color_temp = cw.read() // 16
red = brightness * (255 - color_temp) // 255
green = brightness * (255 - color_temp) // 255
blue = brightness * color_temp // 255
for i in range(16):
np[i] = (red,green,blue)
np.write()
sleep_ms(100)