kinet

package module
v0.0.0-...-efa3d31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2015 License: MIT Imports: 10 Imported by: 1

README

go-kinet - Color Kinetics library

A golang library for interfacing with the Color Kinetics LED lights.

Features

  • Controller and fixture discovery
  • Individual fixture control
  • Controller renaming

Examples

The following examples are included:

discover: discover and list the properties of available controllers and fixtures

rainbow: discover all local fixtures and stream a rainbow fade to all of them

See other

chromaticity: A Philips Hue compatible REST API to control RGB(+) LED lights, includes go-kinet as a backend

kinet: A python library for controlling Color Kinetics lights (and a large help in developing this library!)

Documentation

Index

Constants

View Source
const (
	UINT8_MAX  = 1<<8 - 1
	UINT16_MAX = 1<<16 - 1
)
View Source
const (
	KINET_MAGIC      = 0x4adc0104
	KINET_VERSION    = 0x0001
	KINET_NUM_PIXELS = UINT8_MAX / 3
)
View Source
const (
	KINET_SUP_REQ      = 0x0001
	KINET_SUP_RESP     = 0x0002
	KINET_SET_IP       = 0x0003
	KINET_SET_UNIVERSE = 0x0005
	KINET_SET_NAME     = 0x0006
	KINET_PORT_REQ     = 0x000a
	KINET_PORT_RESP    = 0x000a
	KINET_SET_COLORS   = 0x0101
	KINET_FIXTURE_REQ  = 0x0201
	KINET_FIXTURE_RESP = 0x0202
	KINET_CHAN_REQ     = 0x0203
	KINET_CHAN_RESP    = 0x0204
)

kinet packet types

Variables

This section is empty.

Functions

func TraceLog

func TraceLog(logger *log.Logger)

Types

type Fixture

type Fixture struct {
	Serial  string
	Channel uint8
	Color   color.Color
	PS      *PowerSupply `json:"-"`
}

func (*Fixture) DiscoverChannel

func (fixture *Fixture) DiscoverChannel()

func (*Fixture) SendColor

func (fixture *Fixture) SendColor(c color.Color)

type PowerSupply

type PowerSupply struct {
	Name            string
	IP              string
	Mac             string
	ProtocolVersion string
	Serial          string
	Universe        string
	Manufacturer    string
	Type            string
	FWVersion       string
	Fixtures        []*Fixture
}

func Discover

func Discover() []*PowerSupply

func DiscoverSupplies

func DiscoverSupplies() []*PowerSupply

func (*PowerSupply) DiscoverFixtures

func (ps *PowerSupply) DiscoverFixtures()

func (*PowerSupply) SendColors

func (ps *PowerSupply) SendColors(c []color.Color)

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL