Skip to content
jgarff edited this page Jan 3, 2015 · 19 revisions

Project Information

The BCM2835 in the Raspberry Pi has a PWM module that is well suited to driving individually controllable WS281X LEDs. Using the DMA, PWM FIFO, and serial mode in the PWM controller, this library can be used to control almost any number of WS281X LEDs in a chain connected to the PWM output pin.

Please see the NeoPixels on Raspberry Pi documentation from Adafruit. Thanks to Tony DiCola for this great write-up.

FAQ

  • Does the library support WS2811s?
    Yes. Please make sure your LED signals are connected with a properly configured level shifter. Bad signalling causes almost all reported problems. Please double check your signalling before submitting issues.

  • What signal frequencies are supported?
    The default of 800kHz is the best frequency to use, but others have been known to work. The signal must be clean, so use a level shifter, a small resistor to limit signal ringing, and wires that are as short as possible. See the Adafruit write-up for more information.

  • How many strings of LEDs can be driven?
    Two. The BCM2835 has two PWM channels. One string can be driven from each channel.

  • How many LEDs can be driven per channel?
    Any number of LEDs can be driven, but the refresh rate goes down as the number of LEDs go up. Users have reported successfully driving several thousand LEDs per channel. A rough estimate can be calculated with:
    Frame Rate = 800000 / 24 / Number of LEDs

  • Which GPIOs can I use to connect the LEDs?
    Channel 0 - 12, 18
    Channel 1 - 13, 19 (only available on B+)

    Note: You must make sure to configure the channel properly in software. Changing the pin number alone in the examples are not enough.

Links

Projects Using this Library

Please e-mail me if you would like your project included in this list.

Clone this wiki locally