Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LightsToColors ¶
Types ¶
type Aspect ¶
type Aspect float64
Aspect is an alias for float64 to clarify Direction of LEDs in an Arc. Given in terms of radians.
const ( // AspectDownward indicates that LEDs on an Arc are facing downward AspectDownward Aspect = 0 // AspectOutward indicates that LEDs on an Arc are facing outward AspectOutward Aspect = 0.5 // AspectUpward indicates that LEDs on an Arc are facing upward AspectUpward Aspect = 1.0 // AspectInward indicates that LEDs on an Arc are facing inward AspectInward Aspect = 1.5 )
type Exchanger ¶
type Exchanger struct {
// contains filtered or unexported fields
}
func NewExchanger ¶
func NewExchanger() Exchanger
func (Exchanger) Send ¶
func (e Exchanger) Send(instruct Instruction) error
type Instruction ¶
func (Instruction) GetTime ¶
func (i Instruction) GetTime() time.Time
type Instructions ¶
Instructions is an set of Instructions which are ordered by their Time
func NewInstructions ¶
func NewInstructions() Instructions
NewInstructions initializes and returns a Instructions
func (Instructions) Add ¶
func (p Instructions) Add(c Instruction)
Add inserts a Instruction into a Instructions
func (Instructions) Advance ¶
func (p Instructions) Advance(t time.Time) *Instruction
Advance drops all Instructions before t and returns the most recent Instruction
type Light ¶
Basic represents a NeoPixel Light in a line
func (Light) GetPosition ¶
GetPosition returns the position of the Light (in a string)
type Receiver ¶
type Receiver interface {
Receive(time.Time) *Instruction
}
type Sender ¶
type Sender interface {
Send(Instruction) error
}
type Spacing ¶
type Spacing float64
Spacing is an alias for floats to encourage/support common LED densities of a strip
const ( // Spacing30 is the spacing of LEDs on a strip which has 30 LEDs per meter Spacing30 Spacing = 1.0 / 30.0 // Spacing60 is the spacing of LEDs on a strip which has 60 LEDs per meter Spacing60 Spacing = 1.0 / 60.0 // Spacing120 is the spacing of LEDs on a strip which has 120 LEDs per meter Spacing120 Spacing = 1.0 / 120.0 // Spacing144 is the spacing of LEDs on a strip which has 144 LEDs per meter Spacing144 Spacing = 1.0 / 144.0 )
Click to show internal directories.
Click to hide internal directories.