Control WS281X LEDs from a Raspberry Pi using TypeScript / Node.js
Enumeration | Description |
---|---|
StripType | LED strip type identifiers See https://github.com/jgarff/rpi_ws281x/blob/master/ws2811.h#L46 |
Function | Description |
---|---|
colorwheel(pos) | Returns the colorwheel RGB value as an integer/hex value for the given number Based on C implementation from https://github.com/adafruit/circuitpython/blob/main/shared-module/rainbowio/__init__.c |
rgb2hex(r, g, b) | Convert RGB color (e.g. 255, 255, 255) to HEX number |
Interface | Description |
---|---|
RenderOptions | Options for rendering pixels to the LED strip |
Ws281xAPI | The Ws281x API |
Ws281xConfig | Configuration options for the Ws281x library |
Variable | Description |
---|---|
ws281x | Singleton instance of Ws281x |
Type Alias | Description |
---|---|
PCMGpio | PCM_DOUT, which can be set to use GPIOs 21 and 31. Only 21 is available on the B+/2B/PiZero/3B, on pin 40. See https://github.com/jgarff/rpi_ws281x?tab=readme-ov-file#pcm |
PWM0Gpio | PWM0, which can be set to use GPIOs 12, 18, 40, and 52. Only 12 (pin 32) and 18 (pin 12) are available on the B+/2B/3B See https://github.com/jgarff/rpi_ws281x?tab=readme-ov-file#pwm |
PWM1Gpio | PWM1 which can be set to use GPIOs 13, 19, 41, 45 and 53. Only 13 is available on the B+/2B/PiZero/3B, on pin 33 See https://github.com/jgarff/rpi_ws281x?tab=readme-ov-file#pwm |
SPIGpio | SPI0-MOSI is available on GPIOs 10 and 38. Only GPIO 10 is available on all models. See https://github.com/jgarff/rpi_ws281x?tab=readme-ov-file#spi |
ValidGPIO | Valid GPIOs to use with the Ws281x library |