I’ve been wanting to play with pretty lights on the RPiSoC for a while now, and I finally decided to do just that with this NeoPixel shield from Adafruit. I have a few ideas for some cool strip light applications, and I know that NeoPixels use a familiar driver for their display, the WS2812, so I thought I’d have some fun with it. With a little bit of digging, I got it working just great on the RPiSoC, and with only one pin!
What is really cool about this on the RPiSoC is that the driver is implemented in hardware. One of the typical difficulties with using these strip light controllers is that the protocol used for communication with the LEDs is very very strict with it’s timing requirements. So the typical solution is a bit-banging approach using platform specific assembler code. The problem that usually comes up though, is that this requires a disabling of interrupts while the LEDs are in use, otherwise the timing constraints are not assured to be met. And when interrupts on a microcontroller are disabled, a lot of stuff stops working! This is why NeoPixels and Servo motors don’t really get along on the Arduino.
Not that this is a huge issue at the end of the day, but it is something to be mindful of. I was just very pleased when I was able to get this working without having to worry about those kind of conflicts, since this driver was implemented in hardware on the RPiSoC.
Anyway, I will be doing some cool stuff with it soon I’m sure, so far I have just goofed around with it a little bit. 40 RGB LEDs with 24 bit color all through one pin just has to find it’s way into some projects eventually…
If there are any ideas for what to do with these, let me know!