from machine import Pin
from utime import sleep
from neopixel import NeoPixel
sleep(0.1)
led = NeoPixel(Pin(0), 3) # create NeoPixel driver on GPIO0 for 8 pixels
led2=NeoPixel(Pin(20), 16)
while 1:
r = input("insert r value:")
g= input("insert g value:")
b = input("insert b value:")
for i in range(3):
led[i] = (int(r), int(g), int(b)) # set the first pixel to white
led.write() # write data to all pixels
for i in range(16):
led2[i] = (int(r), int(g), int(b)) # set the first pixel to white
led2.write() # write data to all pixels
print("led valuue:",led[0])
sleep(0.1)