PixelBlaze Output Expander + Raspberry Pi?

Hi, new user here—currently, I’m working on an embedded project with a number of LED strips that I decided to drive using a PixelBlaze Output Expander (the 8/64 channel one). I can get it to work on an Arduino, but I’m very new to the raspberry pi world, and I was wondering if there was anyone who’s done something like this before?
I’m honestly just confused about how to the serial output configured properly on the RPi end—I’d even be willing to bang together & open source a driver library for RPi if I could get that figured out; is there anyone who has relevant knowledge?
Or is there a library or driver somewhere that would work for my case already? I’d hate to reinvent the wheel here…
If this is the wrong place to ask, then I sincerely apologize.

Thanks, Ele M. Eschalier

What type of LEDs do you have?

For 4 wire strips like apa102 can be driven by the raspberry pi’s SPI pins.

For 3 wire strips like ws2812 you really need an arduino, but there is an adafruit library that can drive a limited number of 3 wire leds off a single GPU pin (library doesn’t support multiple pins).

Either way I’ve never tried adding the 8ch output expander to a pi. I think it should work just like fadecandy on pi though.

Links below to libraries and guides from adafruit.

3 wire leds on pi:

4 wire leds on pi using circuit python

Hi @eeschalier,
Check out this NodeJS project that uses the output expander on a Raspberry Pi. There’s a note in the README about using an odd baud rate setting that might be specific to the Pi model used. The code assembles the necessary frame headers and CRCs, and would be a good reference for porting to other languages as well. If nothing else, it gives a nice bit of code that can be used to compare outputs with a new port.

There’s also my Output Expander Arduino driver, which will work on most 32 bit micros like the ESP8266. It is less explicit so may require some fiddling to port to other architectures like the Pi (things like endianness and struct packing).

For using a Raspberry Pi’s built in serial ports, you need to detach the serial console. The default OSes set up a console on it that prevents using it for things like this.

This article has everything you need to know about serial ports (uarts) on the Rapsberry Pi models:


Welp, I ended up banging together a library in C over the last two days, and it seems to work, which is nice. I actually based it on your Arduino driver.
Documentation is a bit bare-bones, but it’s functional enough.
Supports WS2812-protocol LEDs.
I put it up at https://github.com/bosporos/libpbx, in case anyone else ever needs it!


That’s awesome! I’ll have to give it a shot. Thanks for releasing this. Btw no level shifter is needed. The board accepts 3.3v signals and is 5v tolerant.

Brilliant! That makes a few things a bit easier for me, actually.