Datasheet

For powering the pixels from the board, the 3.3V regulator output can handle about 500mA peak which is about 50
pixels with 'average' use. If you want really bright lights and a lot of pixels, we recommend powering direct from the
power source. On the Circuit Playground Express this is the Vout pad - that pad has direct power from USB or BAT,
depending on which is higher voltage.
The NeoPixel object's argument list requires the pin you'll use (any pin can be used) and the number of pixels. There's
two optional arguments, brightness (range from 0 off to 1.0 full brightness) and auto_write. When auto_write default is
pixels[i] = BLUE
time.sleep(wait)
time.sleep(1)
for i in range(len(pixels)):
pixels[i] = PURPLE
time.sleep(wait)
time.sleep(1)
for i in range(len(pixels)):
pixels[i] = BLACK
time.sleep(wait)
time.sleep(1)
while True:
if simpleCircleDemo:
print('Simple Circle Demo')
simpleCircle(.05)
if flashDemo: # this will play if flashDemo = 1 up above
print('Flash Demo')
pixels.fill((255, 0, 0))
pixels.show()
time.sleep(.25)
pixels.fill((0, 255, 0))
pixels.show()
time.sleep(.25)
pixels.fill((0, 0, 255))
pixels.show()
time.sleep(.25)
pixels.fill((255, 255, 255))
pixels.show()
time.sleep(.25)
if rainbowDemo:
print('Rainbow Demo')
rainbow(.001)
if rainbowCycleDemo:
print('Rainbow Cycle Demo')
rainbow_cycle(.001)
You aren't limited to the on-board NeoPixels -- externally connected NeoPixels can be driven by any Digital
IO pin.
© Adafruit Industries https://learn.adafruit.com/adafruit-circuit-playground-express Page 126 of 211