Skip to content

Conversation

@91volt
Copy link
Contributor

@91volt 91volt commented Nov 28, 2025

Summary

This PR updates the documentation for the LED Matrix Painter example to reflect its capabilities, covering database persistence, animation sequencing, and C++ code generation.

What changed

Documentation:

  • Description: Updated the overview to highlighting features like 8-bit grayscale control, real-time board preview, and database storage.
  • Usage Guide: Added a step-by-step walkthrough for the editor interface, including the use of transformation tools (Flip, Rotate, Invert), the new Code Panel, and the Animation mode.
  • Technical Explanation: "Understanding the Code" section details the specific API endpoints defined in main.py (e.g., /persist_frame, /play_animation), the SQLStore database initialization, and the auto-persist logic in the frontend.
  • Architecture: High-level data flow diagram to illustrate the synchronization between the Web Browser, Python Backend, SQLite Database, and the Arduino Sketch.

Assets:

  • Added thumbnail.png to the assets/docs_assets/ folder to provide a visual preview of the application interface.

@91volt 91volt marked this pull request as ready for review November 28, 2025 15:00
@91volt 91volt requested review from TaddyHC and mcmchris November 28, 2025 15:24
Copy link
Contributor

@TaddyHC TaddyHC left a comment

Choose a reason for hiding this comment

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

Few suggestion for you consideration, lgtm!

91volt and others added 3 commits December 1, 2025 11:10
Co-authored-by: TaddyHC <94547080+TaddyHC@users.noreply.github.com>
Co-authored-by: TaddyHC <94547080+TaddyHC@users.noreply.github.com>
Co-authored-by: TaddyHC <94547080+TaddyHC@users.noreply.github.com>
@dsammaruga
Copy link
Collaborator

Is it intended to let AppFrame class (extended from Frame class) not fully descripted into README?
Its behaviuor is central in serialise/deserialise frames and to represent frames with the correct contract for DB operations (with store.py) and for frontend operations.

@91volt
Copy link
Contributor Author

91volt commented Dec 1, 2025

Is it intended to let AppFrame class (extended from Frame class) not fully descripted into README? Its behaviuor is central in serialise/deserialise frames and to represent frames with the correct contract for DB operations (with store.py) and for frontend operations.

@dsammaruga can you check the latest version? Thanks.

@dsammaruga
Copy link
Collaborator

dsammaruga commented Dec 1, 2025

LGTM for the backend description.

Requesting review for the frontend description at @Matteo-it

@91volt 91volt requested a review from Matteo-it December 1, 2025 15:48
@mirkokurt mirkokurt merged commit 7c7379d into arduino:Matteo-it/led-matrix-ui Dec 2, 2025
2 checks passed
mirkokurt pushed a commit that referenced this pull request Dec 2, 2025
* Led matrix UI improvement

* FEAT: Implement styling and reordering for Transform container buttons

* Update UI

* Add tools options

* Update progressbar UI

* Update progressbar UI

* Update matrix UI

* Update matrix UI

* Update anomation ui

* svg update

* add options for frames

* responsive fixs

* Invert fix

* alpha 1

* Update frames UI

* Update animation UI

* Update animation UI

* Update prev/next

* clear comments

* remove hardcoded svg

* Update icons, remove useless files, remove stop button

* Docs led matrix painter (#26)

* docs: update bedtime story teller (#20)

* Update README example

* Revert "docs: update bedtime story teller (#20)"

This reverts commit 9491c29.

* Update documentation, add thumbnail

* Update README

* Update README

* Optimize thumbnail

* Update examples/led-matrix-painter/README.md

Co-authored-by: TaddyHC <94547080+TaddyHC@users.noreply.github.com>

* Update examples/led-matrix-painter/README.md

Co-authored-by: TaddyHC <94547080+TaddyHC@users.noreply.github.com>

* Update examples/led-matrix-painter/README.md

Co-authored-by: TaddyHC <94547080+TaddyHC@users.noreply.github.com>

* Update README AppFrame class description

* Update README understanding code section

* Fix thumbnail

---------

Co-authored-by: TaddyHC <94547080+TaddyHC@users.noreply.github.com>

---------

Co-authored-by: Ernesto Voltaggio <92443068+91volt@users.noreply.github.com>
Co-authored-by: TaddyHC <94547080+TaddyHC@users.noreply.github.com>
- **`ui.expose_api('POST', '/load_frame', load_frame)`**: Loads a frame from the database by ID or retrieves the last edited frame.
3. **Draw Frames**
- **Paint:** Click any cell in the central grid to turn it on.
- **Adjust Brightness:** Click an active cell again (or hover/wait) to open the floating slider and set the brightness level (0-7).
Copy link
Contributor

Choose a reason for hiding this comment

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

We’re now using the tool options to control brightness. There is only one slider that adjusts the brightness level for all cells. So if the brightness is set to 7, every painted cell will use brightness 7 until you change it.

Screenshot 2025-12-02 alle 10 19 57


- **`ui.expose_api('GET', '/list_frames', list_frames)`**: Returns all saved frames for display in the sidebar.
4. **Use the Design Tools**
- **Transform:** Use the **Tools** panel on the left to **Flip Vertically/Horizontally**, **Rotate 180°**, **Invert Matrix** (negative), or **Invert Draw** (brightness).
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest to name it "Transform Tools", since the tools container now it's used to manage brightness only
Screenshot 2025-12-02 alle 10 21 15

- **Create:** Click the **+** button to add a new empty frame.
- **Edit Details:** Assign a **Name** and **Duration** (in milliseconds) for each frame using the inputs above the frame list.
- **Reorder:** Drag and drop frame thumbnails to change their sequence.
- **Load/Delete:** Use the **Load** and **Del** buttons on each thumbnail to switch between frames or remove them.
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no longer a Load button. Now, frames are selected with a simple click—the clicked frame becomes the selected frame and will be displayed in the matrix.

mirkokurt added a commit that referenced this pull request Dec 2, 2025
* Replace SineGenerator with WaveGenerator Brick in Theremin (#8)

* Mascot Jump Game Example Addition (#7)

* Add Bedtime story teller example (#15)

* Mascot Jump Game Update UI (#17)

* Add Object Hunting example documentation (#18)

* Update Theremin Simulator example documentation (#16)

* Add led-matrix-painter (#5)

* Docs: update bedtime story teller (#20)

* Fan vibration monitoring UI (#19)

* Vibration Anomaly Detection Example Documentation (#22)

* Led matrix UI improvement (#24)

* Docs led matrix painter (#26)

---------

Co-authored-by: Dario Sammaruga <48221340+BeanRepo@users.noreply.github.com>
Co-authored-by: Dario Sammaruga <d.sammaruga@ext.arduino.cc>
Co-authored-by: TaddyHC <94547080+TaddyHC@users.noreply.github.com>
Co-authored-by: Stefano Torneo <s.torneo@arduino.cc>
Co-authored-by: Matteo Marsala <matteo.marsala92@gmail.com>
Co-authored-by: Ernesto Voltaggio <92443068+91volt@users.noreply.github.com>
Co-authored-by: Christopher Méndez <49886387+mcmchris@users.noreply.github.com>
Co-authored-by: Stefano Torneo <121802192+stefanotorneo@users.noreply.github.com>
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.

5 participants