]>
vault307.fbx.one Git - Sensory_Wall.git/blob - circuitPython/testline.py
1 # SPDX-FileCopyrightText: 2023 DJDevon3
2 # SPDX-License-Identifier: MIT
3 # Chaining 4 13x9 Matrix's to run sequentially (not simultaneously)
6 from adafruit_led_animation
.sequence
import AnimationSequence
7 from adafruit_led_animation
.animation
.rainbowchase
import RainbowChase
8 from adafruit_is31fl3741
import PREFER_BUFFER
9 from adafruit_is31fl3741
.adafruit_rgbmatrixqt
import Adafruit_RGBMatrixQT
10 from adafruit_is31fl3741
.is31fl3741_pixelbuf
import IS31FL3741_PixelBuf
13 i2c
= board
.STEMMA_I2C()
14 # i2c = board.I2C() # uses board.SCL and board.SDA
16 # Initialize each 13x9 Matrix
17 Matrix30
= Adafruit_RGBMatrixQT(i2c
, address
=0x30, allocate
=PREFER_BUFFER
)
18 Matrix30
.set_led_scaling(0xFF)
19 Matrix30
.global_current
= 0x01
20 Matrix30
.enable
= True
22 Matrix31
= Adafruit_RGBMatrixQT(i2c
, address
=0x31, allocate
=PREFER_BUFFER
)
23 Matrix31
.set_led_scaling(0xFF)
24 Matrix31
.global_current
= 0x01
25 Matrix31
.enable
= True
27 Matrix32
= Adafruit_RGBMatrixQT(i2c
, address
=0x32, allocate
=PREFER_BUFFER
)
28 Matrix32
.set_led_scaling(0xFF)
29 Matrix32
.global_current
= 0x01
30 Matrix32
.enable
= True
32 Matrix33
= Adafruit_RGBMatrixQT(i2c
, address
=0x33, allocate
=PREFER_BUFFER
)
33 Matrix33
.set_led_scaling(0xFF)
34 Matrix33
.global_current
= 0x01
35 Matrix33
.enable
= True
37 # Demo scrolling pixels
43 for y
in range(HEIGHT
)
45 for address
in Adafruit_RGBMatrixQT
.pixel_addrs(x
, y
)
48 Matrix30_pixels
= IS31FL3741_PixelBuf(Matrix30
, LEDS_MAP
, init
=False, auto_write
=False)
49 Matrix30_chase
= RainbowChase(Matrix30_pixels
, speed
=0.1, size
=1, spacing
=3, step
=8)
51 Matrix31_pixels
= IS31FL3741_PixelBuf(Matrix31
, LEDS_MAP
, init
=False, auto_write
=False)
52 Matrix31_chase
= RainbowChase(Matrix31_pixels
, speed
=0.1, size
=1, spacing
=3, step
=8)
54 Matrix32_pixels
= IS31FL3741_PixelBuf(Matrix32
, LEDS_MAP
, init
=False, auto_write
=False)
55 Matrix32_chase
= RainbowChase(Matrix32_pixels
, speed
=0.1, size
=1, spacing
=3, step
=8)
57 Matrix33_pixels
= IS31FL3741_PixelBuf(Matrix33
, LEDS_MAP
, init
=False, auto_write
=False)
58 Matrix33_chase
= RainbowChase(Matrix33_pixels
, speed
=0.1, size
=1, spacing
=3, step
=8)
60 # Run animation on each 13x9 matrix sequentially
61 animations
= AnimationSequence(