Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetColorData ¶
one color-value has 3 bits
high = 1 1 0 low = 1 0 0
0 24bit Green 1 24bit Red 2 24bit Blue => 9 byte
Set all to 0
G7 G6 G5 G4 G3 G2 G1 G0 / R7 R6 R5 ... [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 0 0] ... 0 0 0 0 0 0 0 0 0 0 0 ...
Set all to 1
G7 G6 G5 G4 G3 G2 G1 G0 / R7 R6 R5 ... [1 1 0] [1 1 0] [1 1 0] [1 1 0] [1 1 0] [1 1 0] [1 1 0] [1 1 0] [1 1 0] [1 1 0] [1 1 0] ... 1 1 1 1 1 1 1 1 1 1 1 ... 128 64 32 16 8 4 2 1 128 64 32 ...
SPI issue
G7 G6 G5 G4 G3 G2 G1 G0 / R7 R6 R5 ... [1 1 0] [1 1 0] [1 1 XX 0 ] [1 1 0] [1 1 0] [1 XX 1 0] [1 1 0] [1 1 0] XX [1 1 0] [1 1 0] [1 1 0] ... 1 1 1 XX 1 1 XX 1 1 1 XX 1 1 1 ... 128 64 32 XX 16 8 XX 4 2 1 XX 128 64 32 ...
Set Red
G7 G6 G5 G4 G3 G2 G1 G0 / R7 R6 R5 ... [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 0 0] [1 1 0] [1 0 0] ... 0 0 0 0 0 0 0 0 0 1 0 ... 100 100 100 100 100 100 100 100 100 110 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 110 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 10010010 01001001 00100100 11011011 01101101 10110110 10010010 01001001 00100100 10010010 01001001 00100100 11011011 01101101 10110110 10010010 01001001 00100100
Types ¶
type ConnectionSPI ¶
ConnectionSPIs
func (*ConnectionSPI) Clear ¶
func (c *ConnectionSPI) Clear()
func (*ConnectionSPI) Exit ¶
func (c *ConnectionSPI) Exit()
Exit turns off LEDs and closes SPIConnection
func (*ConnectionSPI) Render ¶
func (c *ConnectionSPI) Render(pixels []RGBPixel)
Render translates RGBPixels into SPI message and transfers the message
type FaderRunner ¶
type FaderRunner struct {
Conn *ConnectionSPI
}
func (*FaderRunner) RunLEDS ¶
func (f *FaderRunner) RunLEDS(leds []RGBPixel, speedFactor float32)
func (*FaderRunner) RunLEDSSplit ¶
func (f *FaderRunner) RunLEDSSplit(leds []RGBPixel, speedFactor float32, invert bool)
Click to show internal directories.
Click to hide internal directories.