Documentation
¶
Index ¶
- type LEDArray
- func (led *LEDArray) Demo(count int, delay int, gradientLength int)
- func (led *LEDArray) Display(delay int) error
- func (led *LEDArray) Fade(target int) error
- func (led *LEDArray) FadeToggleOnOff()
- func (led *LEDArray) SetBrightness() error
- func (led *LEDArray) SetMaxBrightness() error
- func (led *LEDArray) SetMinBrightness() error
- func (led *LEDArray) ToggleOnOff()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LEDArray ¶
type LEDArray struct { WS wsEngine MaxBrightness int MinBrightness int Brightness int Color colorful.Color FadeDuration int Logger *zap.SugaredLogger }
LEDArray is a struct for interacting with LEDs
func NewLEDArray ¶
func NewLEDArray(minBrightness int, maxBrightness, ledCount int, fadeDuration int, logger *zap.SugaredLogger) (*LEDArray, error)
NewLEDArray creates a new array and initializes it
func (*LEDArray) Display ¶
Display changes all of the LEDs one at a time delay: sets the time between each LED changing in milliseconds brightness: sets the brightness for the entire thing
func (*LEDArray) FadeToggleOnOff ¶ added in v0.3.0
func (led *LEDArray) FadeToggleOnOff()
func (*LEDArray) SetBrightness ¶ added in v0.3.0
setBrightness turns the LED array to a brightness value and sets the led.brightness value accordingly if it goes out of bounds, it will be set to min or max
func (*LEDArray) SetMaxBrightness ¶
SetMaxBrightness fades the LED array to maximum brightness
func (*LEDArray) SetMinBrightness ¶
SetMinBrightness fades the LED array to the minimum brightness
func (*LEDArray) ToggleOnOff ¶ added in v0.3.0
func (led *LEDArray) ToggleOnOff()
Click to show internal directories.
Click to hide internal directories.