playbulb

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2017 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FLASH   byte = 0
	PULSE   byte = 1
	RAINBOW byte = 2
	FADE    byte = 3
	CANDLE  byte = 4
	SOLID   byte = 5
)

Variables

This section is empty.

Functions

func NewCandle

func NewCandle(id string) *candle

Types

type Candle

type Candle interface {
	Connect() error
	Disconnect()
	IsConnected() bool

	SetEffect(*Effect) error
	SetColour(*Colour) error
	Off() error
}

type CandleGroup

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

func NewCandleGroup

func NewCandleGroup(cs []Candle) *CandleGroup

func (*CandleGroup) Connect

func (cg *CandleGroup) Connect() error

func (*CandleGroup) Disconnect

func (cg *CandleGroup) Disconnect()

func (*CandleGroup) IsConnected

func (cg *CandleGroup) IsConnected() bool

func (*CandleGroup) Off

func (cg *CandleGroup) Off() error

func (*CandleGroup) SetColour

func (cg *CandleGroup) SetColour(cl *Colour) error

func (*CandleGroup) SetEffect

func (cg *CandleGroup) SetEffect(e *Effect) error

type Colour

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

func ColourFromHexString

func ColourFromHexString(s string) (*Colour, error)

func NewColour

func NewColour(brightness byte, r byte, g byte, b byte) *Colour

func (*Colour) B

func (c *Colour) B() byte

func (*Colour) Brightness

func (c *Colour) Brightness() byte

func (*Colour) G

func (c *Colour) G() byte

func (*Colour) R

func (c *Colour) R() byte

type Effect

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

func NewEffect

func NewEffect(m byte, c *Colour, s byte) *Effect

func (*Effect) Colour

func (e *Effect) Colour() *Colour

func (*Effect) Mode

func (e *Effect) Mode() byte

func (*Effect) Speed

func (e *Effect) Speed() byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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