Documentation ¶
Index ¶
- Constants
- func Delay(ms int)
- type Blinkt
- func (bl *Blinkt) Clear()
- func (bl *Blinkt) SetAll(r int, g int, b int) *Blinkt
- func (bl *Blinkt) SetBrightness(brightness float64) *Blinkt
- func (bl *Blinkt) SetClearOnExit(clearOnExit bool)
- func (bl *Blinkt) SetPixel(p int, r int, g int, b int) *Blinkt
- func (bl *Blinkt) SetPixelBrightness(p int, brightness float64) *Blinkt
- func (bl *Blinkt) Setup()
- func (bl *Blinkt) Show()
Constants ¶
const CLK int = 24
const DAT int = 23
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Blinkt ¶
type Blinkt struct {
// contains filtered or unexported fields
}
Blinkt use the NewBlinkt function to initialize the pixels property.
func NewBlinkt ¶
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 ¶
SetAll sets all pixels to specified r, g, b colour. Show must be called to update the LEDs.
func (*Blinkt) SetBrightness ¶
SetBrightness sets the brightness of all pixels. Brightness supplied should be between: 0.0 to 1.0
func (*Blinkt) SetClearOnExit ¶
SetClearOnExit turns all pixels off on Control + C / os.Interrupt signal.
func (*Blinkt) SetPixel ¶
SetPixel sets an individual pixel to specified r, g, b colour. Show must be called to update the LEDs.
func (*Blinkt) SetPixelBrightness ¶
SetPixelBrightness sets the brightness of pixel p. Brightness supplied should be between: 0.0 to 1.0