is31fl3741 – Creates an in-memory framebuffer for a IS31FL3741 device.¶
Available on these boards
- class is31fl3741.IS31FL3741_FrameBuffer(is31: IS31FL3741, width: int, height: int, mapping: Tuple[int, Ellipsis], *, framebuffer: circuitpython_typing.WriteableBuffer | None = None, scale: bool = False, gamma: bool = False)¶
Create a IS31FL3741_FrameBuffer object with the given attributes.
The framebuffer is in “RGB888” format using 4 bytes per pixel. Bits 24-31 are ignored. The format is in RGB order.
If a framebuffer is not passed in, one is allocated and initialized to all black. In any case, the framebuffer can be retrieved by passing the Is31fl3741 object to memoryview().
A Is31fl3741 is often used in conjunction with a
is31 (is31fl3741.IS31FL3741) – base IS31FL3741 instance to drive the framebuffer
width (int) – width of the display
height (int) – height of the display
mapping (Tuple[int, ...]) – mapping of matrix locations to LEDs
framebuffer (Optional[WriteableBuffer]) – Optional buffer to hold the display
scale (bool) – if True display is scaled down by 3 when displayed
gamma (bool) – if True apply gamma correction to all LEDs
- brightness: float¶
In the current implementation, 0.0 turns the display off entirely and any other value up to 1.0 turns the display on fully.
- deinit() None ¶
Free the resources associated with this IS31FL3741 instance. After deinitialization, no further operations may be performed.
- class is31fl3741.IS31FL3741(i2c: busio.I2C, *, addr: int = 48)¶
Driver for an IS31FL3741 device.
Create a IS31FL3741 object with the given attributes.
Designed to work low level or passed to and object such as
- is31fl3741.set_global_current(self, current: int) None ¶
Sets the global current of the IS31FL3741 chip.
current (int) – global current value 0x00 to 0xFF
- is31fl3741.set_led(self, led: int, value: int, page: int) None ¶
Resets the IS31FL3741 chip.
- is31fl3741.write(mapping: Tuple[int, Ellipsis], buf: circuitpython_typing.ReadableBuffer) None ¶
Write buf out on the I2C bus to the IS31FL3741.
mapping (~Tuple[int, ...]) – map the pixels in the buffer to the order addressed by the driver chip
buf (ReadableBuffer) – The bytes to clock out. No assumption is made about color order