Close

Controlling Daisy Chained Addressable LEDs

A project log for A Versatile Labtool

A cost effective, multi-pronged data acquisition tool to turn your computer into a workbench for science and electronics experiments.

jithinJithin 07/26/2015 at 11:090 Comments

One of the pins from the expansion slot carries signals to drive daisy chained WS2812B RGB LEDs (Certain Neopixels from Adafruit use this model ). Each RGB LED supports 24-bit color(16-million shades) and they can be addressed using a simple python command that accepts a 2D array containing color info for each LED.

A demo app was written using the ColorPicker button that's part of the PyQtGraph toolkit that's used extensively with the vLabtool. The button launches a QColorPicker Widget for each LED in the chain, and the colors are set using

#Set colors red, green, and cyan on LEDs 1,2,3
I.WS2812B( [ [255,0,0],[0,255,0],[0,255,255] ] ) 

Discussions