https://github.com/connorff/led-list
https://github.com/connorff/led-list
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/connorff/led-list
- Owner: connorff
- License: mit
- Created: 2023-03-27T02:21:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-17T17:16:00.000Z (over 3 years ago)
- Last Synced: 2025-03-01T06:08:01.194Z (over 1 year ago)
- Language: Python
- Homepage: https://pypi.org/project/led-list/
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# led-list
Teach Python lists with a [BlinkStick Flex](https://www.blinkstick.com/products/blinkstick-flex)! Each LED represents a list index which can change color and turn off.
# Examples
## Turn on all LEDs
```python
from led_list import LEDList
# initialize list with all lights (32) colored white
l = LEDList(["white"] * 32)
```
## Change specific index
```python
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
```python
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"
```