LEDs - PaMuGa/Frackstock GitHub Wiki
The Frackstock is designed for a length (LED part) of 1m with WS2812b LED stripes with 60 leds/m. Two meters of led stripes are sticked together, so that alsways two leds stick back at back. In total are 120 LEDs implemented.
Software color buffer
The WS2812b controller enables 8bit per color (red, green and blue channel). Thus, a buffer of 120 LEDs * 3 colors => 360 bytes are needed. The WS2812b controller follows a GRB (green red blue) coding format.
LED0 | LED1 | ... |
---|---|---|
G R B | G R B | ... |
LED driving
The SDK für SPI allows a maximum automatic transaction of 256bytes. To transmit all 360 bytes, an interrupt is fired after the firs 256 bytes and the remaining 104 bytes are transmitted in a second transaction.