sysfs

package
v0.0.0-...-cc0ca16 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2018 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const CLK int = 24
View Source
const DAT int = 23

Variables

This section is empty.

Functions

func Delay

func Delay(ms int)

Delay maps to time.Sleep, for ms milliseconds

Types

type Blinkt

type Blinkt struct {
	// contains filtered or unexported fields
}

Blinkt use the NewBlinkt function to initialize the pixels property.

func NewBlinkt

func NewBlinkt(brightness ...float64) Blinkt

NewBlinkt creates a Blinkt to interact with. You must call "Setup()" immediately afterwards.

func (*Blinkt) Clear

func (bl *Blinkt) Clear()

Clear sets all the pixels to off, you still have to call Show.

func (*Blinkt) SetAll

func (bl *Blinkt) SetAll(r int, g int, b int) *Blinkt

SetAll sets all pixels to specified r, g, b colour. Show must be called to update the LEDs.

func (*Blinkt) SetBrightness

func (bl *Blinkt) SetBrightness(brightness float64) *Blinkt

SetBrightness sets the brightness of all pixels. Brightness supplied should be between: 0.0 to 1.0

func (*Blinkt) SetClearOnExit

func (bl *Blinkt) SetClearOnExit(clearOnExit bool)

SetClearOnExit turns all pixels off on Control + C / os.Interrupt signal.

func (*Blinkt) SetPixel

func (bl *Blinkt) SetPixel(p int, r int, g int, b int) *Blinkt

SetPixel sets an individual pixel to specified r, g, b colour. Show must be called to update the LEDs.

func (*Blinkt) SetPixelBrightness

func (bl *Blinkt) SetPixelBrightness(p int, brightness float64) *Blinkt

SetPixelBrightness sets the brightness of pixel p. Brightness supplied should be between: 0.0 to 1.0

func (*Blinkt) Setup

func (bl *Blinkt) Setup()

Setup initializes GPIO via WiringPi base library.

func (*Blinkt) Show

func (bl *Blinkt) Show()

Show updates the LEDs with the values from SetPixel/Clear.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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