Use cases for the LED Matrix module

It draws the lightning bolt as darkened pixels in the charged portion of the battery indicator, and bright pixels in the unfilled.

The artifacting you think you were seeing was probably the tail of the lightning bolt.

If you chose to, instead of commenting out the charging indicator, you could probably use 80% (or whatever your limit is) as the maximum battery value, and not show the indicator if you are within a couple percent of that value.

The last thing I will say is that I suggest you don’t use the charging limit on your laptop unless you always leave it plugged in. While it absolutely does improve your battery longevity, the battery will already last a long time without it, and the batteries are so cheap and easy to replace.

1 Like

That’s correct, it’s the inverse of the lightning bolt in the dark area above. I’ll have to see if I can find the maximum battery percentage in the files as it didn’t stand out to me before but sounds like an awesome idea.

As for charging limits, yes, this is a workstation replacement and is always plugged in. My last laptop that had a heat sink fail also with a charge limit on the battery showed 0% degradation to capacity after 3 years because how little I cycle the battery.

Okay, I figured it out. I added “and battery_ratio <= 0.74” after “if battery_plugged” on line 124 in drawing.py. thank you so much for the suggestion! Now the lightning bolt disappears when my charge level is above 74%! (My bios charge level limit is 75%)

I added an import/export capability to the dotmatrix web app, enabling you to save the displayed patterns as a json file and import them again. There is also a persistence checkbox, which when checked causes the display to never sleep. The modified code can be found in this fork. I submitted a Pull Request to the Framework project, but it doesn’t seem to be actively managed anymore.

I plan to build a python app that will, among other things, be able to import these files exported from the dotmatrix webapp and display them. I want to add other capabilities, maybe a horizontally scrolling marquee that can work across one or two matrix displays, to which you can feed a string that loops or a continuous text stream, and specify the vertical offset of the scrolling text. I’m thinking this could be combined with other capabilities, essentially functioning as a label for other functions displayed in adjacent matrix locations. Maybe this can be eventually developed into a pluggable architecture, enabling the development of simple composable display applications.

Great job on this! I made some extensions to it, and have ideas for a couple more things I’d like to do.

I’m trying to fork your repo and finding it not possible. I tried to create an account, and it gave me an error, but then I found that I was logged in any way. But while logged in, I can’t see your project. If I log out, I can see it, but then I can’t fork it.

Thanks for checking it out!

It’s a private website, but a publicly viewable repository. I’m not sure why you were able to make an account, but it is intended to be closed. You are welcome to download the code and use it as you like. If you host some changes and send me a link I will merge them into the project if I think they would be useful to others.

Have fun tinkering with your LED panels!

Ok, great, that works. I’ll push the code to my Github account with attribution and a link to your repo. When I have something for you to look at, I’ll let you know.

To give you an idea what I’m working on: I added an option to show sensor temps and fan speeds in place of the disk and network metrics on the right panel. I then abstracted that, letting me target different metrics to each of the four quadrants, i.e. the top and bottom partitions you draw on the two panels. I added an arg parser that lets me specify a pre-defined metrics type to a desired quadrant, with the defaults being the ones you originally coded. So far, I just have the temps and fans, but I may add a couple more options. Also adding support for changing the config on the fly as the code runs, with a key listener checking key press status in each tick of your main loop.

BTW, I remember now that what I actually did was connect my Github account to your repo. It let me do that, but then I can’t read the repo when signed in. I was doing that in case you would accept a pull request, but having you check out my repo when I’m ready works just as well.

I appreciate you sharing the code with us. You have a superb framework implemented that makes it easy and fun to tinker with these matrix modules!

@Jeremy_Karst I completed some modifications to your code and pushed the code to a public GitHub repo.

Feel free to incorporate any or all of this into your repo if you like. If you have any comments or suggestions, I’d be happy to address them.

Enhancements and extensions:

  • Added an option to display temperature sensor readings or fan speeds, using the same spiral graph and bar displays you developed
  • The original system monitor apps are displayed by default. Alternative apps can be specified by program arguments. Program args can be specified to be applied when running as a Linux service also.
  • Any of the original or new apps can be targeted to a desired quadrant (i.e. top or bottom of left or right panel)
  • Integrated a plugin framework, so that additional apps can be provided easily by populating a single python script. The temp and fan apps are implemented as a plugin, to serve as an exemplar
  • Optional key listener enables quick display of the app names in each quadrant, while the key is pressed.
  • Auto-detect LED panels, so the code can work as-is with any panel installation setup (i.e. both left, both right, one each on either side of the keyboard, or one panel only on either side.

The README on the repo gives more info, including installation and run instructions.

I’m working on another plugin, to display the contents of a saved JSON 2D array, either persistently or periodically replacing the assigned system monitor apps.

2 Likes

Thanks Mark!

I added you as a collaborator on my code repository so that you are able to submit a pull request. If you are willing to submit a pull request I would prefer to merge that way so that you have proper attribution for your work. If you would rather not, or if I don’t hear from you I will merge your changes myself.

1 Like

Thanks, that’s perfect. I’ll submit a PR, probably this evening.

I built this project for my nixos FW16. Doing some vibe coding. I created a PR.

Decided to fork it. See readme.md for installation/configuration.

Updated with all upstream changes.

Hello all! I made custom firmware for the LED Matrix Modules that makes it easy to set individual brightnesses for each LED and a Rust library to communicate with the firmware. I also expanded on Ecca’s idea and made a system to host multiple ‘applets’ on one LED matrix. Please take a look!

2 Likes

I really wanted to try it, but it unfortunately seems to not work under Ubuntu/Wayland for me. I created a bug report upstream—or can anyone give me a hint how to get it up an running? Thx! :slight_smile:

1 Like

I found some time, please test.

1 Like

Bugs squashed, my fork has latest bug fixes, waiting for upstream to merge. Thanks for testing and feedback.

1 Like

I was thinking on the left I could have some sort of visual of the audio for whatever song I’m playing or whatever sound is coming through the speakers.

And on the right, I want multiple clocks for different locations around the world where my friends and coworkers live.