]> vault307.fbx.one Git - Sensory_Wall.git/blob - circuitPython/colorswirl.py
more sensory wall projects
[Sensory_Wall.git] / circuitPython / colorswirl.py
1 # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2 # SPDX-License-Identifier: MIT
3
4 import board
5 from rainbowio import colorwheel
6
7 from adafruit_is31fl3741.adafruit_rgbmatrixqt import Adafruit_RGBMatrixQT
8 import adafruit_is31fl3741
9
10 i2c = board.I2C() # uses board.SCL and board.SDA
11 # i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
12 is31 = Adafruit_RGBMatrixQT(i2c, allocate=adafruit_is31fl3741.PREFER_BUFFER)
13 is31.set_led_scaling(10)
14 is31.global_current = 50
15 # print("Global current is: ", is31.global_current)
16 is31.enable = True
17 # print("Enabled? ", is31.enable)
18
19 wheeloffset = 0
20 while True:
21 for y in range(9):
22 for x in range(13):
23 is31.pixel(x, y, colorwheel((y * 13 + x) * 2 + wheeloffset))
24 wheeloffset += 1
25 is31.show()