Skip to content

So-Cool/neopixel-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeoPixel Python

A thread-based Python library to control WS281X LEDs (AdaFruits NeoPixels).

Installation

(Dependencies are installed automatically with this method.)

git clone https://github.com/So-Cool/neopixel-python.git
cd neopixel-python
pip install .

Dependencies

This library requires rpi_ws281x and its corresponding Python library. It can be installed either with pip (recommended) or manually -- see below. Detailed installation instructions are available on AdaFruit's website.

Dependency Installation via pip

sudo pip install rpi_ws281x

Manual Dependency Installation

If you want to install the rpi_ws281x library manually:

# Update OS packages
sudo apt-get update
sudo apt-get install build-essential python-dev git scons swig

# Install WS281X driver...
git clone https://github.com/jgarff/rpi_ws281x.git
cd rpi_ws281x
scons

# ...and the corresponding Python package
sudo pip install rpi_ws281x
# `cd python && sudo python setup.py install` has been deprecated

Test with: rpi_ws281x/python/examples/strandtest.py. Adjust LED_PIN to 13 or 18 and LED_CHANNEL 0 to 1.

Notes

This library is distributed with a file (neopixel_python/neopixel.py) adapted from the rpi_ws281x library. It is required for the proper functioning of this package but it is not distributed with the pip's version of rpi_ws281x, which superseded the Python library distributed as a part of rpi_ws281x.

To Do

  • Consider Unicorn Hat as a Linux service written in C and controlled from Python instead. Also have a look at Unicorn Paint and OctaPi's use of Unicorn Hat.

About

Python library the AdaFruit's NeoPixels

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages