from machine import Pin
from neopixel import NeoPixel
from utime import sleep
neo = NeoPixel(Pin(0, Pin.OUT), 3) # create NeoPixel driver on GPIO0 for 3 pixels
neo1 = NeoPixel(Pin(22, Pin.OUT), 16) # create NeoPixel driver on GPIO0 for 3 pixels
while 1:
for i in range(3):
neo[i] = (0, 255, 0) # set the first pixel to white
for i in range(16):
neo1[i] = (0, 255, 0) # set the first pixel to white
neo.write() # write data to all pixels
neo1.write()
sleep(0.5)
for i in range(3):
neo[i] = (0, 0, 0) # set the first pixel to white
for i in range(16):
neo1[i] = (0, 0, 0) # set the first pixel to white
neo.write() # write data to all pixels
neo1.write()
sleep(0.5)