Skip to content

Python interface for streaming color information to a WS2812 LED strip connected to an ESP8266

License

Notifications You must be signed in to change notification settings

ledstrip/pyledstrip

Repository files navigation

pyledstrip

Build Status

Python interface for streaming color information to a WS2812 LED strip connected to an ESP8266 running the firmware from https://github.com/cnlohr/esp8266ws2812i2s

Installation

Using git clone

git clone https://github.com/cipold/pyledstrip.git
cd pyledstrip
python setup.py install

How to use

A simple script which sets the strip to rainbow colors.

from pyledstrip import LedStrip

# Setup LED strip
strip = LedStrip()

# Set rainbow
for pos in range(strip.led_count):
	strip.set_hsv(pos, pos / strip.led_count, 1.0, 1.0)

# Actually transmit the information to the LED strip
strip.transmit()

This example shows how to turn off all LEDs.

from pyledstrip import LedStrip

# Setup LED strip
strip = LedStrip()

# Clear all LEDs and transmit
strip.off()

Examples

More examples how this module is used can be found here: https://github.com/cipold/pyledstrip-examples

About

Python interface for streaming color information to a WS2812 LED strip connected to an ESP8266

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages