Compare commits
1 commit
main
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed42efd6d0 |
4 changed files with 22 additions and 68 deletions
2
.github/workflows/wheels.yml
vendored
2
.github/workflows/wheels.yml
vendored
|
|
@ -50,7 +50,7 @@ jobs:
|
|||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: pypa/cibuildwheel@v2.23.0
|
||||
- uses: pypa/cibuildwheel@v3.0.1
|
||||
env:
|
||||
CIBW_ARCHS_LINUX: ${{ matrix.arch_linux }}
|
||||
CIBW_BUILD: "cp311-manylinux* cp312-manylinux* cp313-manylinux*"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ pixelmap = simple_multilane_mapper(width, height, n_addr_lines, n_lanes)
|
|||
geometry = piomatter.Geometry(width=width, height=height, n_addr_lines=n_addr_lines, n_planes=10, n_temporal_planes=4, map=pixelmap, n_lanes=n_lanes)
|
||||
framebuffer = np.asarray(canvas) + 0 # Make a mutable copy
|
||||
matrix = piomatter.PioMatter(colorspace=piomatter.Colorspace.RGB888Packed,
|
||||
pinout=piomatter.Pinout.Active3BGR,
|
||||
pinout=piomatter.Pinout.Active3,
|
||||
framebuffer=framebuffer,
|
||||
geometry=geometry)
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ def darken_color(hex_color, darkness_factor):
|
|||
|
||||
return darkened_hex_color
|
||||
|
||||
step_count = 8
|
||||
step_count = 4
|
||||
darkness_factor = 0.5
|
||||
|
||||
clearing = False
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
#!/usr/bin/python3
|
||||
# SPDX-FileCopyrightText: 2025 Tim Cocks for Adafruit Industries
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
"""
|
||||
Display a simple test pattern of 3 shapes on three 64x64 matrix panels
|
||||
using Active3 compatible connections.
|
||||
|
||||
Run like this:
|
||||
|
||||
$ python triple_matrix_active3_simpletest.py
|
||||
|
||||
"""
|
||||
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
import adafruit_blinka_raspberry_pi5_piomatter as piomatter
|
||||
from adafruit_blinka_raspberry_pi5_piomatter.pixelmappers import simple_multilane_mapper
|
||||
|
||||
width = 64
|
||||
n_lanes = 6
|
||||
n_addr_lines = 5
|
||||
height = n_lanes << n_addr_lines
|
||||
pen_radius = 1
|
||||
|
||||
canvas = Image.new('RGB', (width, height), (0, 0, 0))
|
||||
draw = ImageDraw.Draw(canvas)
|
||||
|
||||
pixelmap = simple_multilane_mapper(width, height, n_addr_lines, n_lanes)
|
||||
geometry = piomatter.Geometry(width=width, height=height, n_addr_lines=n_addr_lines, n_planes=10, n_temporal_planes=4, map=pixelmap, n_lanes=n_lanes)
|
||||
framebuffer = np.asarray(canvas) + 0 # Make a mutable copy
|
||||
matrix = piomatter.PioMatter(colorspace=piomatter.Colorspace.RGB888Packed,
|
||||
pinout=piomatter.Pinout.Active3,
|
||||
framebuffer=framebuffer,
|
||||
geometry=geometry)
|
||||
|
||||
|
||||
draw.rectangle((8, 8, width-8, width-8), fill=0x008800)
|
||||
draw.circle((32, 64+32), 22, fill=0x880000)
|
||||
draw.polygon([(32, 136), (54, 180), (10, 180)], fill=0x000088)
|
||||
|
||||
framebuffer[:] = np.asarray(canvas)
|
||||
matrix.show()
|
||||
|
||||
input("Press enter to exit")
|
||||
|
|
@ -41,25 +41,6 @@ struct adafruit_matrix_bonnet_pinout_bgr {
|
|||
};
|
||||
|
||||
struct active3_pinout {
|
||||
static constexpr pin_t PIN_RGB[] = {11, 27, 7, 8, 9, 10, 12, 5, 6,
|
||||
19, 13, 20, 14, 2, 3, 26, 16, 21};
|
||||
static constexpr pin_t PIN_ADDR[] = {22, 23, 24, 25, 15};
|
||||
static constexpr pin_t PIN_OE = 18; // /OE: output enable when LOW
|
||||
static constexpr pin_t PIN_CLK = 17; // SRCLK: clocks on RISING edge
|
||||
static constexpr pin_t PIN_LAT = 4; // RCLK: latches on RISING edge
|
||||
|
||||
static constexpr uint32_t clk_bit = 1u << PIN_CLK;
|
||||
static constexpr uint32_t lat_bit = 1u << PIN_LAT;
|
||||
static constexpr uint32_t oe_bit = 1u << PIN_OE;
|
||||
static constexpr uint32_t oe_active = 0;
|
||||
static constexpr uint32_t oe_inactive = oe_bit;
|
||||
|
||||
static constexpr uint32_t post_oe_delay = 0;
|
||||
static constexpr uint32_t post_latch_delay = 0;
|
||||
static constexpr uint32_t post_addr_delay = 5;
|
||||
};
|
||||
|
||||
struct active3_pinout_bgr {
|
||||
static constexpr pin_t PIN_RGB[] = {7, 27, 11, 10, 9, 8, 6, 5, 12,
|
||||
20, 13, 19, 3, 2, 14, 21, 16, 26};
|
||||
static constexpr pin_t PIN_ADDR[] = {22, 23, 24, 25, 15};
|
||||
|
|
@ -78,4 +59,23 @@ struct active3_pinout_bgr {
|
|||
static constexpr uint32_t post_addr_delay = 5;
|
||||
};
|
||||
|
||||
struct active3_pinout_bgr {
|
||||
static constexpr pin_t PIN_RGB[] = {11, 27, 7, 8, 9, 10, 12, 5, 6,
|
||||
19, 13, 20, 14, 2, 3, 26, 16, 21};
|
||||
static constexpr pin_t PIN_ADDR[] = {22, 23, 24, 25, 15};
|
||||
static constexpr pin_t PIN_OE = 18; // /OE: output enable when LOW
|
||||
static constexpr pin_t PIN_CLK = 17; // SRCLK: clocks on RISING edge
|
||||
static constexpr pin_t PIN_LAT = 4; // RCLK: latches on RISING edge
|
||||
|
||||
static constexpr uint32_t clk_bit = 1u << PIN_CLK;
|
||||
static constexpr uint32_t lat_bit = 1u << PIN_LAT;
|
||||
static constexpr uint32_t oe_bit = 1u << PIN_OE;
|
||||
static constexpr uint32_t oe_active = 0;
|
||||
static constexpr uint32_t oe_inactive = oe_bit;
|
||||
|
||||
static constexpr uint32_t post_oe_delay = 0;
|
||||
static constexpr uint32_t post_latch_delay = 0;
|
||||
static constexpr uint32_t post_addr_delay = 5;
|
||||
};
|
||||
|
||||
} // namespace piomatter
|
||||
|
|
|
|||
Loading…
Reference in a new issue