Giter VIP home page Giter VIP logo

kinet's Introduction

Table of Contents

kinet.py

This is a simple object oriented python interface for Color Kinetics "kinet" protocol, written by Giles Hall. It is used to drive color kinetics lights over ethernet. It is pretty easy to get started with.

PowerSupply

A PowerSupply class is an encapsulation of a network attached Color Kinetics power supply, such as the PDS-150e. The PowerSupply class handles building a Header object, which initiates all communications with Color Kinetics network attached devices. If you need to customize the Header payload, this is easily done by making a Header object, changing the attribute in question, and using it as a argument for the PowerSupply's constructor. The default Header should work in most circumstances. If your power supply's IP address was "192.168.1.120", you would simply say the following to instantiate a PowerSupply object:

>>> pds = PowerSupply("192.168.1.120")

Fixture

A fixture is an encapsulation of a single, addressable light fixture. Currently, there is only one Fixture type supported, and that is an RGB fixture. You could extend the Fixture class for RGBAW and white only fixture types.

The RGB fixture allows you to easily control its RGB values through attributes. You can also get or set the RGB values using HSV, which are internally converted. This makes it easy to write rainbow cycles. See example.py for an example on how to do this.

Fixtures are constructed on their lowest DMX address value. For example, if a RGB fixture spans (3,4,5), you would build the fixture object on 3 like so:

>>> fix = FixtureRGB(3)

The PowerSupply class inherits from list. To bind a fixture to a PowerSupply, all you need to do is append it:

>>> pds = PowerSupply("192.168.1.120")
>>> fix = FixtureRGB(3)
>>> pds.append(fix)

To change a value on the lights, you would simply tell the PowerSupply to go():

>>> pds = PowerSupply("192.168.1.120")
>>> fix = FixtureRGB(3)
>>> pds.append(fix)
>>> pds[0].rgb = (255, 0, 0)
>>> pds.go()

FadeIter

FadeIter is a convenience class to allow smooth transitions between two different scenes. It will fade all the 512 channels between two different scenes for a duration of time. For example, if we wanted to fade the first fixture from all off to entirely on over a ten second period, we would simply write the following:

>>> pds1 = PowerSupply("192.168.1.120")
>>> pds1.append(fix)
>>> pds2 = pds1.copy()
>>> pds2[0].rgb = (255, 255, 255)
>>> fi = FadeIter(pds1, pds2, 10)
>>> fi.go()

Examples of kinet.py in the Wild

A group of students from Drexel used kinet.py to drive a 30-story version of Pong in Philadelphia.

Michael Dewberry ported kinet.py to C++ to drive a ColorKinetics video wall of LEDs. You can find it within his alphadep project.

Dedication

This library is dedicated to the memory of Kevin "Frostbyte" McCormick, a brilliant light artist who continues to be a source of inspiriation for the EE/LED community at large.

kinet's People

Contributors

vishnubob avatar

Watchers

James Cloos avatar  avatar

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.