ws2812fxfirmata

package module
v0.0.0-...-9649554 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: MIT Imports: 2 Imported by: 0

README

go-ws2812fx-firmata

go-ws2812fx-firmata is a Golang client for the ws2812fx-firmata Arduino library.

What?

Write Go code to control Neopixels.

Documentation

Index

Constants

View Source
const (

	// WS2812FX neopixel modes
	// a list of modes can be found in the WS2812FX repo:
	// https://github.com/kitesurfer1404/WS2812FX/blob/837b7dd843f0e0c38347c13e4b4594d6dc603162/src/WS2812FX.h#L120-L180
	FXModeStatic               = 0
	FXModeBlink                = 1
	FXModeBreath               = 2
	FXModeColorWipe            = 3
	FXModeColorWipeInv         = 4
	FXModeColorWipeRev         = 5
	FXModeColorWipeRevInv      = 6
	FXModeColorWipeRandom      = 7
	FXModeRandomColor          = 8
	FXModeSingleDynamic        = 9
	FXModeMultiDynamic         = 10
	FXModeRainbow              = 11
	FXModeRainbowCycle         = 12
	FXModeScan                 = 13
	FXModeDualScan             = 14
	FXModeFade                 = 15
	FXModeTheaterChase         = 16
	FXModeTheaterChaseRainbow  = 17
	FXModeRunningLights        = 18
	FXModeTwinkle              = 19
	FXModeTwinkleRandom        = 20
	FXModeTwinkleFade          = 21
	FXModeTwinkleFadeRandom    = 22
	FXModeSparkle              = 23
	FXModeFlashSparkle         = 24
	FXModeHyperSparkle         = 25
	FXModeStrobe               = 26
	FXModeStrobeRainbow        = 27
	FXModeMultiStrobe          = 28
	FXModeBlinkRainbow         = 29
	FXModeChaseWhite           = 30
	FXModeChaseColor           = 31
	FXModeChaseRandom          = 32
	FXModeChaseRainbow         = 33
	FXModeChaseFlash           = 34
	FXModeChaseFlashRandom     = 35
	FXModeChaseRainbowWhite    = 36
	FXModeChaseBlackout        = 37
	FXModeChaseBlackoutRainbow = 38
	FXModeColorSweepRandom     = 39
	FXModeRunningColor         = 40
	FXModeRunningRedBlue       = 41
	FXModeRunningRandom        = 42
	FXModeLarsonScanner        = 43
	FXModeComet                = 44
	FXModeFireworks            = 45
	FXModeFireworksRandom      = 46
	FXModeMerryChristmas       = 47
	FXModeFireFlicker          = 48
	FXModeFireFlickerSoft      = 49
	FXModeFireFlickerIntense   = 50
	FXModeCircusCombustus      = 51
	FXModeHalloween            = 52
	FXModeBicolorChase         = 53
	FXModeTricolorChase        = 54
	FXModeIcu                  = 55
	FXModeCustom               = 56
	FXModeCustom0              = 56
	FXModeCustom1              = 57
	FXModeCustom2              = 58
	FXModeCustom3              = 59
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NeopixelDriver

type NeopixelDriver struct {
	gobot.Eventer
	// contains filtered or unexported fields
}

NeopixelDriver represents a connection to a NeoPixel

func NewNeopixelDriver

func NewNeopixelDriver(a *firmata.Adaptor) *NeopixelDriver

NewNeopixelDriver returns a new NeopixelDriver

func (*NeopixelDriver) ModeCycle

func (neo *NeopixelDriver) ModeCycle() error

ModeCycle cycles through modes

func (*NeopixelDriver) SetBrightness

func (neo *NeopixelDriver) SetBrightness(brightness uint8) error

SetBrightness sets the brightness

func (*NeopixelDriver) SetColor

func (neo *NeopixelDriver) SetColor(color uint32) error

SetColor sets the color of the strip

func (*NeopixelDriver) SetConfig

func (neo *NeopixelDriver) SetConfig(pin uint8, pixelCount uint16) error

SetConfig sets the pin and pixel count for the Neopixel strip

func (*NeopixelDriver) SetMode

func (neo *NeopixelDriver) SetMode(mode uint8) error

SetMode sets the mode

func (*NeopixelDriver) SetPixel

func (neo *NeopixelDriver) SetPixel(pix uint16, color uint32) error

SetPixel sets the color of one specific Neopixel in the strip

func (*NeopixelDriver) Start

func (neo *NeopixelDriver) Start() error

Start turns on all the Neopixels in the strip

func (*NeopixelDriver) Stop

func (neo *NeopixelDriver) Stop() error

Stop turns off all the Neopixels in the strip

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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