Skip to content

Add native support for Pimoroni Scroll pHAT HD (IS31FL3731) - #302

Merged
thijstriemstra merged 6 commits into
rm-hull:mainfrom
Trotter73:add-scrollphathd-support
Nov 27, 2026
Merged

thijstriemstra merged 6 commits into
rm-hull:mainfrom
Trotter73:add-scrollphathd-support

Conversation

@Trotter73

@Trotter73 Trotter73 commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Adds a new scrollphathd device class, driven natively over I2C by directly talking to the IS31FL3731 LED matrix controller's register map - not a wrapper around Pimoroni's own scrollphathd library.

  • Register constants live in const.py (new is31fl3731 class), and the protocol/rendering logic lives directly on the scrollphathd device class in device.py, consistent with how max7219/ws2812/apa102 are structured elsewhere in this module.
  • 17x7 grid of individually PWM-dimmable white LEDs (256 brightness levels), addressed via a 32-bit RGBA image, consistent with the apa102/unicornhathd convention of using the alpha channel to set per-pixel brightness.
  • Physical LED addressing (visible x,y -> 144-pixel chip buffer index, and the enable/wiring bitmap) is derived algorithmically rather than hardcoded, and cross-checked against the known-good Pimoroni mapping.
  • Adds tests/test_scrollphathd.py, examples/scrollphathd_demo.py, and documentation updates (README, intro, python-usage, CHANGES).

fixes #100

Adds a new scrollphathd device class, driven natively over I2C by
directly talking to the IS31FL3731 LED matrix controller's register
map - not a wrapper around Pimoroni's own scrollphathd library.

- Register constants live in const.py (new is31fl3731 class), and the
  protocol/rendering logic lives directly on the scrollphathd device
  class in device.py, consistent with how max7219/ws2812/apa102 are
  structured elsewhere in this module.
- 17x7 grid of individually PWM-dimmable white LEDs (256 brightness
  levels), addressed via a 32-bit RGBA image, consistent with the
  apa102/unicornhathd convention of using the alpha channel to set
  per-pixel brightness.
- Physical LED addressing (visible x,y -> 144-pixel chip buffer index,
  and the enable/wiring bitmap) is derived algorithmically rather than
  hardcoded, and cross-checked against the known-good Pimoroni mapping.
- Adds tests/test_scrollphathd.py, examples/scrollphathd_demo.py, and
  documentation updates (README, intro, python-usage, CHANGES).
Comment thread luma/led_matrix/const.py Resolved
Comment thread tests/test_scrollphathd.py Resolved
Comment thread luma/led_matrix/device.py Resolved
@thijstriemstra

Copy link
Copy Markdown
Collaborator

Thanks. Looks like #303 needs to be merged first.

@thijstriemstra

Copy link
Copy Markdown
Collaborator

@Trotter73 When I was about to merge this PR I noticed your contribution in the gitlog was:

Co-authored-by: Your Name <you@example.com>

Is that placeholder name intentional? If so I'll replace it by your github username, or please let me know what it should be instead.

@Trotter73

Copy link
Copy Markdown
Contributor Author

@Trotter73 When I was about to merge this PR I noticed your contribution in the gitlog was:

Co-authored-by: Your Name <you@example.com>

Is that placeholder name intentional? If so I'll replace it by your github username, or please let me know what it should be instead.

Hi,
Sorry, no it wasn't intentional, I hadn't set my user.name, first time and all that 😉

If you could set it to my github username that would be fantastic 👌

Many thanks!

@thijstriemstra
thijstriemstra merged commit 0e37fc8 into rm-hull:main Nov 27, 2026
7 of 9 checks passed
@Trotter73
Trotter73 deleted the add-scrollphathd-support branch November 27, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Scroll pHAT HD

3 participants