Skip to content

Commit 02cdb17

Browse files
authored
Update README.md
1 parent 74e5309 commit 02cdb17

File tree

1 file changed

+11
-46
lines changed

1 file changed

+11
-46
lines changed

README.md

+11-46
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
# L.I.T.
22
***Lit Illumination Technology***
33
## Synopisis
4-
This is an improved version of the <a href="http://github.com/nickpesce/neopixels">Neopixels</a> project</br>
5-
The lit daemon makes it very easy to control ws281x addressable leds using a raspberry pi. Once the daemon is started, 'effects' can be started and state can be queried using a python api. Addition effects can be added very easily, and LEDs over IP (LOIPs) can be connected using [lit_arduino](https://github.com/nickpesce/lit_arduino)
4+
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.
65
## Installation
7-
<ol>
8-
<li>Install the python module rpi_ws281x<br/>
9-
<code>sudo pip install rpi_ws281x</code></li>
10-
<li>Clone this repository to your Raspberry Pi<br/>
11-
<code>$ git clone https://github.com/nickpesce/lit.git</code></li>
12-
<li>Install the package<br/>
13-
<code>$ cd lit</code><br/>
14-
<code>$ sudo ./setup.py build</code> <br/>
15-
<code>$ sudo ./setup.py install</code></li>
16-
</ol>
6+
<code>sudo pip install lit-core</code>
177

188
### Startup Script
199
*If you are are using a config path that is not "/home/pi/.lit/litd", you must first edit the command in litd.service*
@@ -30,54 +20,29 @@ The lit daemon makes it very easy to control ws281x addressable leds using a ras
3020
</ol>
3121

3222
## Customization
33-
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 config.ini and ranges.json is almost definitely necessary. To copy the default configuration files, use <code>litd -g PATH</code>. For example, <code>litd -g /home/pi/.lit/litd</code>, then run it with <code>sudo litd -c /home/pi/.lit/litd</code>
23+
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 <code>litd -g PATH</code>. For example, <code>litd -g /home/pi/.lit/litd</code>, then run it with <code>sudo litd -c /home/pi/.lit/litd</code>
3424
<ul>
35-
<li>config.ini:
36-
<ul>
37-
<li>
38-
General
39-
<ul>
40-
<li>leds: The number of leds connected to your pi</li>
41-
<li>pin: The pwm/pcm/spi pin that your data line is connected to</li>
42-
</ul>
43-
</li>
44-
</ul>
45-
</li>
46-
4725
<li>ranges.json: Contains information about light groupings.
4826
<ul>
49-
<li>sections: Contiguous sections of leds defined by a name mapped to a start and end index.</li>
50-
<li>zones: Groups of sections that can all be controlled at once. Defined by a name mapped to a list of sections.</li>
51-
<li><a href="#virtual-sections">virtual_sections</a>: Light sections that are connected through a udp interface.</li>
52-
<li>default: The section or zone that should be used if none are explictly chosen.
27+
<li>sections: Contiguous sections of leds.</li>
28+
<li>adapters: Devices that can be used to control leds.</li>
29+
<li>zones: Groups of sections that can all be controlled at once.</li>
30+
<li>default: The section or zone that should be used if none are explictly sepecified</li>
5331
</ul>
5432
</li>
5533

5634
<li>presets.json: Named groups of effects that can be run together. Maps preset names to preset objects.
5735
Preset objects contain:
5836
<ul>
59-
<li>start_string: Message that is returned when the preset starts</li>
60-
<li>commands: List of commands to run. Commands are objects with an "effect" string and "args" object</li>
37+
<li>start_message: Message that is returned when the preset starts</li>
38+
<li>commands: List of commands to run.</li>
6139
</ul>
6240
</li>
6341

64-
<li>colors.json: A list of all preset color values defined by an object containing a name and color. The color field is defined as an array contining a red, green, and blue value.
65-
</li>
42+
<li>colors.json: Named color values that can be used by interfaces.</li>
6643

67-
<li>speeds.json: Preset speed values. An object containing a mapping between names and speeds. 0 is the slowest possible, and 50 is the default.
68-
</li>
44+
<li>speeds.json: Named speed values that can be used by interfaces</li>
6945
</ul>
7046

71-
## Virtual Sections
72-
If your leds can't all be connected by one wire, a udp connection can be made. This can work with any device, but the only officially supported device is the Arduino 8266 with [this library](https://github.com/nickpesce/lit_arduino). To set a virtual section, add an entry in the "virtual_sections" section of ranges.json. The format is as follows:
73-
74-
<code>
75-
"virtual_sections": {"section_name": {"num_pixels": 60, "ip": "192.168.1.2", "port": 9000}}
76-
</code>
77-
78-
79-
80-
_**Note: The virtual section must be named exactly the same as an already defined section. The start and end of the section specifies where the lights will be relative to the other "local" sections. The virtual_section will specify how that section is controlled.**_
81-
8247
## Adding New Effects
8348
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.

0 commit comments

Comments
 (0)