Documentation
¶
Index ¶
Constants ¶
View Source
const ( Off = 0x0 White = 0xFFFFFF Red = 0xff0000 Green = 0x00ff00 Blue = 0x000ff Yellow = 0xeeff00 Orange = 0xff7b00 )
color constants
View Source
const (
TypeWS281x = "WS281x"
)
Supported types
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Indicator ¶
type Indicator interface { DisplayColor(index int, colorHex uint32) error Blink(index int, times int, colorHex uint32) error Cleanup() }
Indicator is an abstraction layer for connector status indication, usually an RGB LED strip.
func NewIndicator ¶
NewIndicator constructs the Indicator based on the type provided by the settings file.
type WS281x ¶
type WS281x struct {
// contains filtered or unexported fields
}
func NewWS281xStrip ¶
NewWS281xStrip create a new LED strip object with the specified number of LEDs and the data pin. When created, it will also be initialized.
func (*WS281x) Blink ¶
Blink the LED at index a certain number of times with the specified color. If the number of times the LED is supposed to blink is even, it will stay turned off after the blinking, otherwise it will stay on after the blinking.
Click to show internal directories.
Click to hide internal directories.