get_led_strip

get_led_strip(spi_device: str = '/dev/spidev0.0', num_leds: int = 10, spi_speed_khz: int = 800, pixel_type: pi5neo.EPixelType = EPixelType.RGB, quiet_mode: bool = True) Any | NullLEDStrip[source]

Factory function to get an instance of the LED strip.

Parameters:
  • spi_device (str) – SPI device path

  • num_leds (int) – Number of LEDs in the strip

  • spi_speed_khz (int) – SPI speed in kHz

  • pixel_type (EPixelType) – Color channel order of the pixels. One of EPixelType.RGB / GRB / RGBW / GRBW (RGB/GRB are 3-channel, RGBW/GRBW have a dedicated white channel).

  • quiet_mode (bool) – Whether to suppress output

Returns:

An instance of the LED strip class or a base class if initialization fails

Return type:

NullLEDStrip