import machine, neopixel, urandom, time
PIN = 0 # Data pin -> GP0
NPIX = 8 # Number of NeoPixels
DELAY = 0.2 # Delay between updates
np = neopixel.NeoPixel(machine.Pin(PIN), NPIX)
while True:
for i in range(NPIX):
np[i] = (urandom.getrandbits(8),
urandom.getrandbits(8),
urandom.getrandbits(8))
np.write()
time.sleep(DELAY)
Varsha