Simple test¶
Ensure your device works with this simple test.
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4import time
5import board
6import adafruit_is31fl3741
7
8i2c = board.I2C() # uses board.SCL and board.SDA
9# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
10is31 = adafruit_is31fl3741.IS31FL3741(i2c)
11
12is31.set_led_scaling(0xFF) # turn on LEDs all the way
13is31.global_current = 0xFF # set current to max
14is31.enable = True # enable!
15
16# light up every LED, one at a time
17while True:
18 for pixel in range(351):
19 is31[pixel] = 255
20 time.sleep(0.01)
21 is31[pixel] = 0
Matrix Examples¶
Other examples working on matrix display.
Pillow Examples¶
Examples that utilize the Python Imaging Library (Pillow) for use on (Linux) computers that are using CPython with Adafruit Blinka to support CircuitPython libraries. CircuitPython does not support PIL/pillow (python imaging library)!