@@ -12,7 +12,7 @@ The application uses the `dbstorage_sqlstore` Brick to automatically save your w
1212
1313Key features include:
1414- ** Real-time Control:** Drawing on the web grid updates the UNO Q matrix instantly.
15- - ** 8-bit Grayscale:** Support for 8 brightness levels per pixel (0-7) .
15+ - ** Grayscale Control :** 8 brightness presets (0-7) for intuitive pixel control, with full 8-bit precision (0-255) supported at the hardware level .
1616- ** Persistent Storage:** Frames are automatically saved to a database, allowing you to build complex animations over time.
1717- ** Transformation Tools:** Invert, rotate, or flip designs with a single click.
1818- ** Animation Mode:** Sequence frames to create animations and preview them on the board.
@@ -39,7 +39,7 @@ The LED Matrix Painter example uses the following Bricks:
3939## How to Use the Example
4040
41411 . ** Run the App**
42- Launch the App clicking the ** Run** button from Arduino App Lab.
42+ Launch the example by clicking the ** Run** button from Arduino App Lab.
4343
44442 . ** Access the Editor**
4545 Open the App in your browser at ` <UNO-Q-IP-ADDRESS>:7000 ` .
@@ -139,6 +139,18 @@ def apply_frame_to_board(frame: AppFrame):
139139 Bridge.call(" draw" , frame_bytes)
140140```
141141
142+ - ** Code Generation** : The ` AppFrame ` class generates the C++ code displayed in the UI. It formats the internal array data into ` uint32_t ` hex values.
143+
144+ ``` python
145+ # app_frame.py
146+ def to_c_string (self ) -> str :
147+ c_type = " uint32_t"
148+ parts = [f " const { c_type} { self .name} [] = {{ " ]
149+ # Converts pixel brightness data to uint32_t hex format
150+ parts.append(" };" )
151+ return " \n " .join(parts)
152+ ```
153+
142154### 🔧 Arduino Component (` sketch.ino ` )
143155
144156The sketch is designed to be a passive renderer, accepting commands from the Python backend.
0 commit comments