Skip to main content

Teach Python lists with a BlinkStick LED strip.

Project description

led-list

Teach Python lists with a BlinkStick Flex! Each LED represents a list index which can change color and turn off.

Examples

Turn on all LEDs

from led_list import LEDList

# initialize list with all lights (32) colored white
l = LEDList(["white"] * 32)

Change specific index

from led_list import LEDList

# initialize list with all lights (32) colored white
l = LEDList(["white"] * 32)

# change first light to red
l[0] = "red"

# change second light to custom RGB value
l[1] = (255, 50, 50)

Turn off lights

from led_list import LEDList

# initialize list with all lights (32) colored white
l = LEDList(["white"] * 32)

# turn off every light sequentially
for x in range(len(l)):
    l[x] = "black"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

led_list-0.5.3.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

led_list-0.5.3-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page