Software to Control RGB Strips

Chris Angelico rosuav at gmail.com
Fri Jan 13 13:24:41 EST 2017


On Sat, Jan 14, 2017 at 5:07 AM,  <brettsalyer at gmail.com> wrote:
> Hey all,
>
> I was debating on getting some RGB light strips for my room. I noticed, from this tutorial:
>
> http://popoklopsi.github.io/RaspberryPi-LedStrip/#!/ws2812
>
>
> there is a  WS2812x library to run commands that control the RGB strip.
>
> Do I just need to download the WS2812x library, and, then, access that library as I would, say, a header file in C++? In Pythons syntax, of course.
>
> Anything to get me pointed in the right direction would be greatly appreciated! Thanks!

Pretty much, yeah. The Python syntax to do that is probably:

import ws2812

although a glance at the examples suggests that the package might be
called "neopixel" instead, which is a bit surprising.

You may be able to skip the download and compilation steps and just run this:

python3 -m pip install rpi_ws281x

I don't know anything about the library itself, but that's the normal
way to install more Python packages. You can find a full list of
packages you can install that way here:

https://pypi.python.org/pypi

There's a lot of them :)

Enjoy!

ChrisA


More information about the Python-list mailing list