Datasheet

You'll need to install the Adafruit_Blinka library that provides the CircuitPython support in Python. This may also require
verifying you are running Python 3. Since each platform is a little different, and Linux changes often, please visit the
CircuitPython on Linux guide to get your computer ready (https://adafru.it/BSN)!
Once that's done, from your command line run the following command:
sudo pip3 install adafruit-circuitpython-neopixel
If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use
CircuitPython on Python 2.x, it isn't supported!
CircuitPython & Python Usage
To demonstrate the usage of this library with NeoPixel LEDs, we'll use the board's Python REPL.
Run the following code to import the necessary modules and initialise a NeoPixel strip with 30 LEDs. Don't forget to
change the pin if your NeoPixels are connected to a different pin, and change the number of pixels if you have a
different number.
Now you're ready to light up your NeoPixel LEDs using the following properties:
brightness - The overall brightness of the LED
fill - Color all pixels a given color.
show - Update the LED colors if auto_write is set to False .
For example, to light up the first NeoPixel red:
For NeoPixels to work on Raspberry Pi, you must run the code as root! Root access is required to access the
RPi peripherals.
import board
import neopixel
pixels = neopixel.NeoPixel(board.D5, 30) # Feather wiring!
# pixels = neopixel.NeoPixel(board.D18, 30) # Raspberry Pi wiring!
pixels[0] = (255, 0, 0)
© Adafruit Industries https://learn.adafruit.com/adafruit-neopixel-uberguide Page 26 of 100