From adaac898ad0d9b8c23bfe2253d86e82359abfde6 Mon Sep 17 00:00:00 2001 From: caternuson Date: Fri, 18 Jul 2025 09:19:16 -0700 Subject: [PATCH] update readme --- README.rst | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 500d0b1..55e8412 100644 --- a/README.rst +++ b/README.rst @@ -64,13 +64,24 @@ Matrix: .. code:: python - from adafruit_is31fl3741.matrix import Matrix + import time import board - import busio - with busio.I2C(board.SCL, board.SDA) as i2c: - display = Matrix(i2c) - display.fill(127) + import adafruit_is31fl3741 + i2c = board.I2C() # uses board.SCL and board.SDA + # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller + is31 = adafruit_is31fl3741.IS31FL3741(i2c) + + is31.set_led_scaling(0xFF) # turn on LEDs all the way + is31.global_current = 0xFF # set current to max + is31.enable = True # enable! + + # light up every LED, one at a time + while True: + for pixel in range(351): + is31[pixel] = 255 + time.sleep(0.01) + is31[pixel] = 0 Documentation =============