Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lit-illumination-technology/lit_core

Control LED strips with a Raspberry Pi
https://github.com/lit-illumination-technology/lit_core

daemon iot leds lights lit neopixels pi python raspberry-pi rpi sk6812rgbw ws2811 ws2812 ws2812b ws281x

Last synced: 2 days ago
JSON representation

Control LED strips with a Raspberry Pi

Awesome Lists containing this project

README

        

# L.I.T.
***Lit Illumination Technology***
## Synopisis
Lit-core is a the foundation of the LIT ecosystem. it provides an interface that makes it very easy to control ws281x addressable leds using a raspberry pi.
## Installation
sudo pip install lit-core

### Startup Script
*If you are are using a config path that is not "/home/pi/.lit/litd", you must first edit the command in litd.service*



  1. sudo cp litd.service /etc/systemd/system


  2. sudo systemctl daemon-reload


  3. sudo systemctl start litd && sudo systemctl enable litd

## Customization
litd should be started with a --config PATH flag. The following files should all be in the PATH/config/ directory. Overriding the default configurations is optional, but making changes to ranges.json is almost definitely necessary. To copy the default configuration files, use litd -g PATH. For example, litd -g /home/pi/.lit/litd, then run it with sudo litd -c /home/pi/.lit/litd


  • ranges.json: Contains information about light groupings.

    • sections: Contiguous sections of leds.

    • adapters: Devices that can be used to control leds.

    • zones: Groups of sections that can all be controlled at once.

    • default: The section or zone that should be used if none are explictly sepecified


  • presets.json: Named groups of effects that can be run together. Maps preset names to preset objects.
    Preset objects contain:

    • start_message: Message that is returned when the preset starts

    • commands: List of commands to run.


  • colors.json: Named color values that can be used by interfaces.
  • speeds.json: Named speed values that can be used by interfaces

## Adding New Effects
Easily add new and personalized effects. Basic python knowlege is required. To start, create a directory called 'effects' in your base directory (same level as the config directory). Create an empty file named '\_\_init\_\_.py' in the new directory. Finally, restart the daemon. Now any python files that are in this directory, or subdirectories of this directory, will try to be imported as effects when the daemon is started. Refer to effects/\_template.py for more information.