Code Monkey home page Code Monkey logo

lit_core's Introduction

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.

lit_core's People

Contributors

nickpesce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lit_core's Issues

Problems after the system restart of raspberry pi

I Restart my raspberry pi and it will only light up three beads.

I restart my raspberry pi(4B) after it will only light up three beads.
It can only be fix it after use: sudo systemctl restart litd

This is my ranges.json

{
    "sections" : [
        {"name": "range 1", "size": 10, "adapter": "ws2812"},
        {"name": "range 2", "size": 10, "adapter": "ws2812"},
        {"name": "range 3", "size": 10, "adapter": "ws2812"}
    ],
    "adapters": [
        {"name": "ws2812", "type": "ws2812", "pin": 18, "size": 30}
    ],
    "zones" : [
        {"name": "all", "sections": ["range 1", "range 2", "range 3"]},
        {"name": "one and two", "sections": ["range 1", "range 2"]}
    ],
    "default" : "all"
}

Problem uploading json files

I'm on RasPi3 - fresh & updated OS.

I'm getting error when I'm trying upload generated json files to api-ai.

Unable to load file. Please, make sure field 'name' is exists and is not empty.

I can create manually Entity, then paste manually content of every file. Haven't tested if it works, tho.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.