Program for Framework 16 LED Matrix

4 months ago 4

When I got my Framework 16, I thought that there would be a program to interact with the LED matrix. As it turns out, there wasn't any real first-party solution - and the third-party programs had no GUI. So, I decided to create my own. This program uses widgets to describe what should be displayed on the LED matrix. New widgets can be created and seamlessly added by dropping them in a folder. I made this out of a geniune need for a program to interact with hardware I use every day, so it should recieve a reasonable frequency of updates.


Visit


Downloads

(Only the source allows you to install widgets with new dependencies)


Gallery


How to Run

From Source

  1. Acquire a recent installation of Python
  2. Install FWMM's dependencies with pip:
    • filedialpy
    • pyserial
    • aiohttp
    • numpy
    • Linux: python_crontab
    • Windows: winshell
  3. Download the source code and extract it.
  4. Execute main.py from within the extracted folder

From Binary

  1. Download the latest Linux build from GitHub releases
  2. Execute FWMM with ./FWMM (you may have to run sudo chmod +x ./FWMM if you are denied excute permissions)

Usage

When launching the program, your web browser should open to the dashboard. If it doesn't, visit http://127.0.0.1:5621. Here's an overview of what each section of the application does.

Layout

All of your customizations will live inside a "layout" file, which has a .mmw file extension but is really just a JSON file. You may load or save your layouts as this, and setting a default layout will cause that layout to be loaded whenever you start FWMM again.

Control

  • Stop: This is where you can stop FWMM, which will turn off your LED matrix.
  • Add/Remove from Startup: Clicking these will register FWMM to either your Linux crontab or your Windows startup folder. This feature will allow FWMM to start whenever you log into your computer. You must set a default layout to use this feature, or your matrix will display nothing!
  • Render Now: This button skips the rendering update loop and renders whatever is on your matrix. This is for if FWMM gets put in a weird state where it does not automatically render things.

Widgets

To add a widget to the active layout, drag it over from the rightmost pane into the middle pane. It will appear there, and you can configure it as you wish. Every widget in your layout will appear in the leftmost pane as a colored rectangle. You can customize the color of this rectangle with the widget's color selector, and it will persist.

Creating New Widgets

  1. Create a new Python file in the widgets folder
  2. Create a class named Widget that is a subclass of the Widget class in widget.py
  3. Fill out required fields and create the functions that will render the widget and inform of size changes
  4. Run main.py and add your new widget to a layout!

There is a template for this under template.py in the root of the GitHub repository.


Other

If you find a bug, please open a GitHub issue and/or contribute a pull request to fix it. Thanks for checking out this project!

Read Entire Article