Skip to content

Various touchups#9

Merged
FoamyGuy merged 11 commits into
adafruit:mainfrom
FoamyGuy:various_touchups
Feb 4, 2025
Merged

Various touchups#9
FoamyGuy merged 11 commits into
adafruit:mainfrom
FoamyGuy:various_touchups

Conversation

@FoamyGuy

@FoamyGuy FoamyGuy commented Feb 4, 2025

Copy link
Copy Markdown
Contributor

Two new examples:

  • rainbow_spiral.py plots a spiral around the edges of the matrix using PIL circles along with rainbowio
  • quote_scroller.py fetches a quote from the API and scrolls it using PIL to render text and then copy/paste it into the image that gets shown each refresh frame.

Updated the fbmirror examples to accept arguments for matrix size, orientation, and scale for the scaled one.

Added a requirements.txt, and fixed a filepath in the readme.

@FoamyGuy
FoamyGuy requested a review from jepler February 4, 2025 15:08
@FoamyGuy

FoamyGuy commented Feb 4, 2025

Copy link
Copy Markdown
Contributor Author

Also added an animated gif example that plays nyan cat by default.

@jepler jepler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine but I worry a little about the repetition of the command line flag handling.

https://github.com/hzeller/rpi-rgb-led-matrix/blob/552ef44edf80fd56955c6e87ac322eda44b5f07c/bindings/python/samples/samplebase.py has a way of sharing command line flags settings across multiple examples.

I'm just thinking about how, if you wanted to add support for 5-address panels you'd have to go back and change all the examples one by one.

It's up to you whether you want to do something like this now, or whether you think it's not critical.

@FoamyGuy

FoamyGuy commented Feb 4, 2025

Copy link
Copy Markdown
Contributor Author

Thank you. I'm going to merge it as-is for now so that I can get the new examples embedded into the learn guide.

I will add it to my list to come back and change them to use argparse though, I agree that it will be a nicer solution. I always forget of it's existence and my brain tries to jump straight from argv index access to full Click CLI app which I thought was overkill for this.

@FoamyGuy
FoamyGuy merged commit 00101f6 into adafruit:main Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants