adafruit_is31fl3731

CircuitPython driver for the IS31FL3731 charlieplex IC.

Base library.

  • Author(s): Tony DiCola, Melissa LeBlanc-Williams, David Glaude, E. A. Graham Jr.

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_is31fl3731.IS31FL3731(i2c: I2C, frames: Iterable | None = None, address: int = 116)[source]

The IS31FL3731 is an abstract class contain the main function related to this chip. Each board needs to define width, height and pixel_addr.

Parameters:
  • i2c (I2C) – the connected i2c bus i2c_device

  • address (int) – the device address; defaults to 0x74

  • frames (Iterable) – list of frame indexes to use. int’s 0-7.

audio_play(sample_rate: int, audio_gain: int = 0, agc_enable: bool = False, agc_fast: bool = False) None[source]

Controls the audio play feature

audio_sync(value: int | None) int | None[source]

Set the audio sync feature register

autoplay(delay: int = 0, loops: int = 0, frames: int = 0) None[source]

Start autoplay

Parameters:
  • delay – in ms

  • loops – number of loops - 0->7

  • frames – number of frames: 0->7

Updates the blink register

fade(fade_in: int | None = None, fade_out: int | None = None, pause: int = 0) int[source]

Start and stop the fade feature. If both fade_in and fade_out are None (the default), the breath feature is used for fading. if fade_in is None, then fade_in = fade_out. If fade_out is None, then fade_out = fade_in

Parameters:
  • fade_in – fade time in ms, range = 26 to 3328

  • fade-out – fade time in ms, range = 26 to 3328

  • pause – pause time in ms, range = 3.5 to 448

fill(color: int | None = None, frame: int | None = None, blink: bool = False)[source]

Fill the display with a brightness level

Parameters:
  • color – brightness 0->255

  • blink – bool True to blink

  • frame – int the frame to set the pixel, default 0

frame(frame: int | None = None, show: bool = True) int | None[source]

Set the current frame

Parameters:
  • frame – int frame number; 0-7 or None. If None function returns current frame

  • show – bool True to show the frame; False to not show.

image(img: Image, frame: int | None = None, blink: bool = False) None[source]

Set buffer to value of Python Imaging Library image. The image should be in 8-bit mode (L) and a size equal to the display size.

Parameters:
  • img – Python Imaging Library image

  • blink – True to blink

  • frame – the frame to set the image, default 0

pixel(x: int, y: int, color: int | None = None, frame: int | None = None, blink: bool = False, rotate: int = 0) int | None[source]

Matrix display configuration

Parameters:
  • x – int horizontal pixel position

  • y – int vertical pixel position

  • color – int brightness value 0->255

  • blink – bool True to blink

  • frame – int the frame to set the pixel, default 0

  • rotate – int display rotation (0, 90, 180, 270)

static pixel_addr(x: int, y: int) int[source]

Calulate the offset into the device array for x,y pixel

reset() None[source]

Kill the display for 10MS

sleep(value: bool) int | None[source]

Set the Software Shutdown Register bit

Parameters:

value – True to set software shutdown bit; False unset

adafruit_is31fl3731.charlie_bonnet

CircuitPython driver for the IS31FL3731 charlieplex IC.

  • Author(s): Tony DiCola, Melissa LeBlanc-Williams

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_is31fl3731.charlie_bonnet.CharlieBonnet(i2c: I2C, frames: Iterable | None = None, address: int = 116)[source]

Supports the Charlieplexed bonnet

static pixel_addr(x, y)[source]

Calulate the offset into the device array for x,y pixel

adafruit_is31fl3731.charlie_wing

CircuitPython driver for the IS31FL3731 charlieplex IC.

  • Author(s): Tony DiCola, Melissa LeBlanc-Williams

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_is31fl3731.charlie_wing.CharlieWing(i2c: I2C, frames: Iterable | None = None, address: int = 116)[source]

Supports the Charlieplexed feather wing

static pixel_addr(x, y)[source]

Calulate the offset into the device array for x,y pixel

adafruit_is31fl3731.keybow2040

CircuitPython driver for the IS31FL3731 charlieplex IC.

  • Author(s): Tony DiCola, Melissa LeBlanc-Williams

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_is31fl3731.keybow2040.Keybow2040(i2c: I2C, frames: Iterable | None = None, address: int = 116)[source]

Supports the Pimoroni Keybow 2040 with 4x4 matrix of RGB LEDs

static pixel_addr(x, y)[source]

Calulate the offset into the device array for x,y pixel

pixelrgb(x, y, r, g, b, blink=None, frame=None)[source]

Blink or brightness for x, y-pixel

Parameters:
  • x – horizontal pixel position

  • y – vertical pixel position

  • r – red brightness value 0->255

  • g – green brightness value 0->255

  • b – blue brightness value 0->255

  • blink – True to blink

  • frame – the frame to set the pixel

adafruit_is31fl3731.led_shim

CircuitPython driver for the IS31FL3731 charlieplex IC.

  • Author: David Glaude

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_is31fl3731.led_shim.LedShim(i2c, address=117)[source]

Supports the LED SHIM by Pimoroni

static pixel_addr(x, y)[source]

Translate an x,y coordinate to a pixel index.

pixelrgb(x, r, g, b, blink=None, frame=None)[source]

Blink or brightness for x-pixel

Parameters:
  • x – horizontal pixel position

  • r – red brightness value 0->255

  • g – green brightness value 0->255

  • b – blue brightness value 0->255

  • blink – True to blink

  • frame – the frame to set the pixel

adafruit_is31fl3731.matrix

CircuitPython driver for the IS31FL3731 charlieplex IC.

  • Author(s): Tony DiCola, Melissa LeBlanc-Williams

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_is31fl3731.matrix.Matrix(i2c: I2C, frames: Iterable | None = None, address: int = 116)[source]

Charlieplexed Featherwing & IS31FL3731 I2C Modules

image(img: None, frame: int | None = None, blink: bool = False)[source]

Set buffer to value of Python Imaging Library image. The image should be in 8-bit mode (L) and a size equal to the display size.

Parameters:
  • img – Python Imaging Library image

  • blink – True to blink

  • frame – the frame to set the image

static pixel_addr(x: int, y: int) int[source]

Calulate the offset into the device array for x,y pixel

adafruit_is31fl3731.charlie_bonnet

CircuitPython driver for the IS31FL3731 charlieplex IC.

  • Author(s): Tony DiCola, Melissa LeBlanc-Williams

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_is31fl3731.matrix_11x7.Matrix11x7(i2c, address=117)[source]

Supports the 11x7 LED Matrix Breakout by Pimoroni

static pixel_addr(x, y)[source]

Translate an x,y coordinate to a pixel index.

adafruit_is31fl3731.rgbmatrix5x5

CircuitPython driver for the IS31FL3731 charlieplex IC.

  • Author(s): Tony DiCola, Melissa LeBlanc-Williams, David Glaude, James Carr

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_is31fl3731.rgbmatrix5x5.RGBmatrix5x5(i2c: I2C, frames: Iterable | None = None, address: int = 116)[source]

Supports the Pimoroni RGBmatrix5x5 with 5x5 matrix of RGB LEDs

static pixel_addr(x, y)[source]

Calulate the offset into the device array for x,y pixel

pixelrgb(x, y, r, g, b, blink=None, frame=None)[source]

Blink or brightness for x, y-pixel

Parameters:
  • x – horizontal pixel position

  • y – vertical pixel position

  • r – red brightness value 0->255

  • g – green brightness value 0->255

  • b – blue brightness value 0->255

  • blink – True to blink

  • frame – the frame to set the pixel

adafruit_is31fl3731.scroll_phat_hd

CircuitPython driver for the Pimoroni 17x7 Scroll pHAT HD.

  • Author: David Glaude

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_is31fl3731.scroll_phat_hd.ScrollPhatHD(i2c: I2C, frames: Iterable | None = None, address: int = 116)[source]

Supports the Scroll pHAT HD by Pimoroni

static pixel_addr(x, y)[source]

Translate an x,y coordinate to a pixel index.