Documentation ¶
Index ¶
- Constants
- type Piglow
- func (p *Piglow) Apply() (err error)
- func (p *Piglow) DisplayValueOnTentacle(tentacle int, val float64, max_val float64, brightness uint8, direction bool)
- func (p *Piglow) SetAll(brightness uint8)
- func (p *Piglow) SetBlue(brightness uint8)
- func (p *Piglow) SetGreen(brightness uint8)
- func (p *Piglow) SetLED(n int8, brightness uint8)
- func (p *Piglow) SetOrange(brightness uint8)
- func (p *Piglow) SetRed(brightness uint8)
- func (p *Piglow) SetTentacle(tentacle int, brightness uint8)
- func (p *Piglow) SetWhite(brightness uint8)
- func (p *Piglow) SetYellow(brightness uint8)
Constants ¶
View Source
const ( CMD_ENABLE_OUTPUT byte = 0x00 CMD_ENABLE_LEDS byte = 0x13 CMD_SET_PWM_VALUES byte = 0x01 CMD_UPDATE byte = 0x16 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Piglow ¶
type Piglow struct {
// contains filtered or unexported fields
}
func (*Piglow) DisplayValueOnTentacle ¶
func (p *Piglow) DisplayValueOnTentacle(tentacle int, val float64, max_val float64, brightness uint8, direction bool)
Display a value on a tentacle. tentacle: 0-2, the tentacle to display the value val: the value to display max_val: the range in which to display the value. If val equals, or goes above this all LEDs will be lit. brightness: What the max brightness should be for fully list LEDs direction: start the display from the centre out, or the outside in
func (*Piglow) SetLED ¶
Set LED n to brightness n must be 0 through 17 brightness must be 0 through 255
func (*Piglow) SetTentacle ¶
Set all LEDs along the whole of a tentacle to brightness
Click to show internal directories.
Click to hide internal directories.