Documentation
¶
Overview ¶
This package manages the NeoPixel LEDs (and maintains a local data representation) via ws2812
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ErrOutOfRange ¶
type ErrOutOfRange struct{}
func (ErrOutOfRange) Error ¶
func (ErrOutOfRange) Error() string
type NeoPixels ¶
type NeoPixels struct { AutoWrite bool // Write changes directly to the LEDs. If false, you must call .Flush() // contains filtered or unexported fields }
func New ¶
Returns a new NeoPixel struct set to read off the given pin. LED indices are zero-indexed, obviously. Initializes all LEDs to OFF.
func (*NeoPixels) Flush ¶ added in v1.1.0
Apply the current state of the LEDs to the board itself. This is called automatically if .AutoWrite is set. Use .Flush() if you want to ensure multiple LED changes occur simultaneously, rather than incrementally.
func (*NeoPixels) SetAllLEDs ¶
func (np *NeoPixels) SetAllLEDs(colors []led)
Sets all LEDs to the colors associated with their index. Only updates to the lower of the two lengths (LED count and len(colors)).
func (*NeoPixels) StaticRainbow ¶ added in v1.1.1
func (np *NeoPixels) StaticRainbow()
Click to show internal directories.
Click to hide internal directories.