jacdac.led

Submodules

Package Contents

Classes

LedClient

A controller for displays of individually controlled RGB LEDs.

class jacdac.led.LedClient(bus: jacdac.bus.Bus, role: str)

Bases: jacdac.bus.Client

A controller for displays of individually controlled RGB LEDs.
  • For 64 or less LEDs, the service should support the pack the pixels in the pixels register.

  • Beyond this size, the register should return an empty payload as the amount of data exceeds

  • the size of a packet. Typically services that use more than 64 LEDs

  • will run on the same MCU and will maintain the pixels buffer internally.

Implements a client for the LED service.

property pixels: bytes | None

A buffer of 24bit RGB color entries for each LED, in R, G, B order. When writing, if the buffer is too short, the remaining pixels are set to #000000; If the buffer is too long, the write may be ignored, or the additional pixels may be ignored. If the number of pixels is greater than max_pixels_length, the read should return an empty payload.,

property brightness: float | None

Set the luminosity of the strip. At 0 the power to the strip is completely shut down., _: /

property actual_brightness: float | None

This is the luminosity actually applied to the strip. May be lower than brightness if power-limited by the max_power register. It will rise slowly (few seconds) back to brightness is limits are no longer required., _: /

property num_pixels: int | None

Specifies the number of pixels in the strip., _: #

property num_columns: int | None

(Optional) If the LED pixel strip is a matrix, specifies the number of columns., _: #

property max_power: int | None

(Optional) Limit the power drawn by the light-strip (and controller)., _: mA

property leds_per_pixel: int | None

(Optional) If known, specifies the number of LEDs in parallel on this device. The actual number of LEDs is num_pixels * leds_per_pixel., _: #

property wave_length: int | None

(Optional) If monochrome LED, specifies the wave length of the LED. Register is missing for RGB LEDs., _: nm

property luminous_intensity: int | None

(Optional) The luminous intensity of all the LEDs, at full brightness, in micro candella., _: mcd

property variant: jacdac.led.constants.LedVariant | None

(Optional) Specifies the shape of the light strip.,