neopixel

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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
}

LEDArray is a struct for interacting with LEDs

func NewLEDArray

func NewLEDArray(minBrightness int, maxBrightness, ledCount int, fadeDuration int) (*LEDArray, error)

NewLEDArray creates a new array and initializes it

func (*LEDArray) Display

func (led *LEDArray) Display(delay int) error

Display changes all of the LEDs one at a time delay: sets the time between each LED coming on brightness: sets the brightness for the entire thing

func (*LEDArray) Fade

func (led *LEDArray) Fade(target int) error

Fade goes to a new brightness in the duration specified

func (*LEDArray) SetMaxBrightness

func (led *LEDArray) SetMaxBrightness() error

SetMaxBrightness fades the LED array to maximum brightness

func (*LEDArray) SetMinBrightness

func (led *LEDArray) SetMinBrightness() error

SetMinBrightness fades the LED array to the minimum brightness

Jump to

Keyboard shortcuts

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