Repository navigation
Add native support for Pimoroni Scroll pHAT HD (IS31FL3731) #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
thijstriemstra
merged 6 commits into
rm-hull:main
from
Trotter73:add-scrollphathd-support
Nov 27, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
548a9ff
Add native support for Pimoroni Scroll pHAT HD (IS31FL3731)
e110d63
Update versionadded directive to 1.10.0
Trotter73 18e47d0
Update copyright year in test_scrollphathd.py
thijstriemstra c1ce54d
Merge branch 'main' into add-scrollphathd-support
thijstriemstra 40e9932
Fix wording in Unicorn HAT HD documentation
thijstriemstra e60f74d
Update copyright year in scrollphathd_demo.py
thijstriemstra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/usr/bin/env python | ||
| # -*- coding: utf-8 -*- | ||
| # Copyright (c) 2026 Richard Hull and contributors | ||
| # See LICENSE.rst for details. | ||
|
|
||
| import time | ||
|
|
||
| from luma.led_matrix.device import scrollphathd | ||
| from luma.core.render import canvas | ||
|
|
||
| device = scrollphathd() | ||
|
|
||
|
|
||
| def main(): | ||
| # Sweep a single lit pixel across the whole 17x7 grid | ||
| for y in range(device.height): | ||
| for x in range(device.width): | ||
| with canvas(device) as draw: | ||
| draw.point((x, y), fill="white") | ||
| time.sleep(0.02) | ||
|
|
||
| # Fade the whole display up and down using the alpha channel to | ||
| # control per-pixel brightness | ||
| for _ in range(3): | ||
| for alpha in list(range(0, 256, 8)) + list(range(255, -1, -8)): | ||
| with canvas(device) as draw: | ||
| draw.rectangle(device.bounding_box, fill=(255, 255, 255, alpha)) | ||
| time.sleep(0.01) | ||
|
|
||
| device.clear() | ||
| device.show() | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| try: | ||
| main() | ||
| except KeyboardInterrupt: | ||
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.