Contributors

CircuitPython NeoPixel

NeoPixels are a revolutionary and ultra-popular way to add lights and color to your project. These stranded RGB lights have the controller inside the LED, so you just push the RGB data and the LEDs do all the work for you! They're a perfect match for CircuitPython

You can drive 300 pixels with brightness control and 1000 pixels without (set brightness=1.0 in object creation). That's because to adjust the brighness we have to dynamically re-create the datastream each write.

For powering the pixels from the board, the 3.3V regulator output from the Trinket/Gemma M0 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 Gemma M0 this is the Vout pad - that pad has direct power from USB or BAT, depending on which is higher voltage. On the Trinket M0 the USB or BAT pins will give you direct power from the USB port or battery.

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 set to True, every change is immediately written to the strip of pixels, this is easier to use but way slower. if you set auto_write=False then you will have to call strip.show() when you want to actually write color data out.

You can easily set colors by indexing into the location strip[n] = (red, green, blue). For example, strip[0] = (100, 0, 0) will set the first pixel to a medium-brightness red, and strip[2] = (0, 255, 0) will set the third pixel to bright green. Then, if you have auto_write=Falsedon't forget to call strip.show()

Verify the wiring on your strip or device - plugging into the 'DOUT' side is a common mistake! Wire up NeoPixels only while the Trinket or Gemma is not on, to avoid possible damage!

If the power to the NeoPixels is > 5.5V you may have some difficulty driving some strips, in which case you may need to lower the voltage to 4.5-5V or use a level shifter

OUT OF STOCK NOTIFICATION

YOUR NAME

YOUR EMAIL

You have been successfully subscribed to the Notification List for this product and will therefore receive an e-mail from us when it is back in stock!

For security reasons, an e-mail has been sent to you acknowledging your subscription. Please remember that this subscription will not result in you receiving any e-mail from us about anything other than the restocking of this item.

If, for any reason, you would like to unsubscribe from the Notification List for this product you will find details of how to do so in the e-mail that has just been sent to you!