luxafor

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

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

Go to latest
Published: Oct 25, 2018 License: MIT Imports: 3 Imported by: 3

README

Luxafor

Go lib for Luxafor LED device. https://luxafor.com

Documentation

Index

Constants

View Source
const (
	SingleSmall = 1
	SingleLarge = 2
	DoubleSmall = 3
	DoubleLarge = 4
)

Wave types available

Variables

This section is empty.

Functions

This section is empty.

Types

type LED

type LED byte

LED represents the location of an individual LED to control on the Luxafor.

const (
	FrontTop    LED = 1
	FrontMiddle LED = 2
	FrontBottom LED = 3
	BackTop     LED = 4
	BackMiddle  LED = 5
	BackBottom  LED = 6
	FrontAll    LED = 65
	BackAll     LED = 66
	All         LED = 255
)

Exported locations that represent individual--and sets of--LEDs on the Luxafor.

type Luxafor

type Luxafor struct {
	// contains filtered or unexported fields
}

Luxafor is used to access the devices.

func Enumerate

func Enumerate() []Luxafor

Enumerate returns a slice of attached Luxafors

func (Luxafor) Fade

func (lux Luxafor) Fade(led LED, r, g, b, speed uint8) (err error)

Fade sets the led to rgb at speed.

func (Luxafor) Off

func (lux Luxafor) Off() (err error)

Off turns off the luxafor.

func (Luxafor) Police

func (lux Luxafor) Police(loops int) (err error)

Police look like da popo

func (Luxafor) Set

func (lux Luxafor) Set(led LED, r, g, b uint8) (err error)

Set sets a golux.LED to the specific RGB value.

func (Luxafor) Sets

func (lux Luxafor) Sets(leds []LED, r, g, b uint8) (err error)

Sets sets multiple golux.LED to the specific RGB value.

func (Luxafor) Solid

func (lux Luxafor) Solid(r, g, b uint8) (err error)

Solid turns the specified luxafor into a solid RGB color.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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