]> vault307.fbx.one Git - Sensory_Wall.git/blob - circuitPython/ledmatrixTest.py
more sensory wall projects
[Sensory_Wall.git] / circuitPython / ledmatrixTest.py
1 # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2 # SPDX-License-Identifier: MIT
3
4 import time
5 import board
6 import adafruit_is31fl3741
7
8 i2c = board.I2C() # uses board.SCL and board.SDA
9 # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
10 is31 = adafruit_is31fl3741.IS31FL3741(i2c)
11
12 is31.set_led_scaling(0xFF) # turn on LEDs all the way
13 is31.global_current = 0xFF # set current to max
14 is31.enable = True # enable!
15
16 # light up every LED, one at a time
17 while True:
18 for pixel in range(351):
19 is31[pixel] = 255
20 time.sleep(0.01)
21 is31[pixel] = 0