Lit Illumination Technology
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.
sudo pip install lit-core
If you are are using a config path that is not "/home/pi/.lit/litd", you must first edit the command in litd.service
-
sudo cp litd.service /etc/systemd/system
-
sudo systemctl daemon-reload
-
sudo systemctl start litd && sudo systemctl enable litd
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
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.