jacdac.led.client

Module Contents

Classes

LedClient

A controller for small displays of individually controlled RGB LEDs.

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

Bases: jacdac.bus.BufferClient

A controller for small displays of individually controlled RGB LEDs.
  • This service handles displays with 64 or less LEDs.

  • Use the [LED strip service](/services/ledstrip) for longer light strips.

Implements a client for the LED service.

property pixels Optional[bytes]

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.,

property brightness Optional[float]

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

property actual_brightness Optional[float]

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 Optional[int]

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

property num_columns Optional[int]

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

property max_power Optional[int]

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

property leds_per_pixel Optional[int]

(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 Optional[int]

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

property luminous_intensity Optional[int]

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

property variant Optional[jacdac.led.constants.LedVariant]

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

_sync()
show()

Sends the buffer information to the server

set_all(rgb: Union[int, Tuple[int, int, int], List[int]])

Sets all the colors to particular color