import neopixel
from machine import Pin
from time import sleep
from random import randrange as r
nl = 32
leds = neopixel.NeoPixel(Pin(4), nl)
while True:
#leds.fill([0,0,0])
col1 = [r(100,255),r(100,255),r(100,255) ]
col2 = [r(100,255),r(100,255),r(100,255) ]
for l in range(nl):
leds[l] = col1
if l >= 16:
leds[l] = col2
sleep(0.1)
leds.write()
for l in range(nl//2):
leds[l+nl//2] = col1
if l < 16:
leds[nl//2 - l - 1] = col2
sleep(0.1)
leds.write()