neopixel

package
v0.0.0-...-eb5837a Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Colors = []RGBW{
		RGBW{0x64, 0x00, 0x00, 0x00},
		RGBW{0x00, 0x64, 0x00, 0x00},
		RGBW{0x00, 0x00, 0x64, 0x00},
		RGBW{0x00, 0x00, 0x00, 0x64},
		RGBW{0x00, 0x64, 0x64, 0x00},
		RGBW{0x64, 0x64, 0x00, 0x00},
		RGBW{0x64, 0x32, 0x00, 0x00},
	}
	ColorIndex = 0
	PixelIndex = 0
)

Functions

This section is empty.

Types

type EffectsController

type EffectsController struct {
	Effects     []func(*chan struct{})
	EffectIndex int

	ColorCh chan struct{}

	APDS9960      *apds9960.Device
	EffectRunning bool
	// contains filtered or unexported fields
}

func (*EffectsController) ChangeEffect

func (e *EffectsController) ChangeEffect()

func (*EffectsController) CycleColors

func (e *EffectsController) CycleColors(stopCh *chan struct{})

func (*EffectsController) GestureSense

func (e *EffectsController) GestureSense(stopCh *chan struct{})

func (*EffectsController) Glow

func (e *EffectsController) Glow(stopCh *chan struct{})

func (*EffectsController) Init

func (*EffectsController) KnightRider

func (e *EffectsController) KnightRider(stopCh *chan struct{})

func (*EffectsController) ProximitySense

func (e *EffectsController) ProximitySense(stopCh *chan struct{})

func (*EffectsController) Start

func (e *EffectsController) Start()

func (*EffectsController) Static

func (e *EffectsController) Static(stopCh *chan struct{})

func (*EffectsController) StopEffects

func (e *EffectsController) StopEffects()

type NeoPixel

type NeoPixel struct {
	Color RGBW
}

func (*NeoPixel) SetColor

func (p *NeoPixel) SetColor(color RGBW)

type NeoPixelController

type NeoPixelController struct {
	Pin        machine.Pin
	Controller ws2812.Device
	NeoPixels  []*NeoPixel
	Enabled    bool
}

func (*NeoPixelController) ChangeColor

func (n *NeoPixelController) ChangeColor()

func (*NeoPixelController) Clear

func (n *NeoPixelController) Clear()

func (*NeoPixelController) ClearPixels

func (n *NeoPixelController) ClearPixels()

func (*NeoPixelController) Fill

func (n *NeoPixelController) Fill(color RGBW)

func (*NeoPixelController) Init

func (n *NeoPixelController) Init(pixels int)

func (*NeoPixelController) SetPixel

func (n *NeoPixelController) SetPixel(index int, color RGBW)

Func ShowPixel sets a Single Pixel Color

func (*NeoPixelController) Show

func (n *NeoPixelController) Show()

type RGBW

type RGBW struct {
	R byte
	G byte
	B byte
	W byte
}

func (*RGBW) GBRASlice

func (c *RGBW) GBRASlice() []byte

Jump to

Keyboard shortcuts

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