Skip to content

Commit 0970468

Browse files
authored
Merge pull request #421 from arduino/jacobhylen/uno-r4-ledmatrix-rev
[MKC-918][UNO-R4-WiFi] LED Matrix docs update
2 parents b4ec6aa + 691d20a commit 0970468

File tree

1 file changed

+35
-4
lines changed
  • content/hardware/02.hero/boards/uno-r4-wifi/tutorials/led-matrix

1 file changed

+35
-4
lines changed

content/hardware/02.hero/boards/uno-r4-wifi/tutorials/led-matrix/led-matrix.md

+35-4
Original file line numberDiff line numberDiff line change
@@ -223,15 +223,46 @@ delay(1000);
223223
}
224224
```
225225

226-
## FotogramMatrice
227-
The FotogramMatrice tool is used to generate frames and animations to be rendered on the LED matrix.
226+
## Animation Generation
227+
Arduino has developed a tool that is used to generate frames and animations to be rendered on the LED matrix in your browser.
228+
229+
[Click here](https://ledmatrix-editor.arduino.cc) to go to the LED Matrix tool.
228230

229231
It also features a live preview of the frames you're creating displayed right on the LED matrix of the Arduino UNO R4 WiFi, although this is only supported in Google Chrome.
230-
// THIS PART IS UNFINISHED, waiting to learn where the live preview sketch will be hosted.
232+
233+
To use the live preview feature of this tool, you need to upload this sketch to your board
234+
235+
```arduino
236+
#include "Arduino_LED_Matrix.h"
237+
238+
ArduinoLEDMatrix matrix;
239+
240+
void setup() {
241+
Serial.begin(115200);
242+
matrix.begin();
243+
char myText[8];
244+
String numero = dtostrf(1.9f, 5, 2, myText );
245+
}
246+
247+
uint32_t frame[] = {
248+
0, 0, 0, 0xFFFF
249+
};
250+
251+
void loop() {
252+
if(Serial.available() >= 12){
253+
frame[0] = Serial.read() | Serial.read() << 8 | Serial.read() << 16 | Serial.read() << 24;
254+
frame[1] = Serial.read() | Serial.read() << 8 | Serial.read() << 16 | Serial.read() << 24;
255+
frame[2] = Serial.read() | Serial.read() << 8 | Serial.read() << 16 | Serial.read() << 24;
256+
matrix.loadFrame(frame);
257+
}
258+
}
259+
```
231260

232261
With the live preview sketch loaded on your board, connect the port to the browser, and watch as the pixels turn on and off as you edit the grid in your browser.
233262

234-
// waiting for the interface to be developed
263+
Once you've made your animations, you can export them from the tool in the format that lets you use them like [previously discussed](#how-to-write-a-frame).
264+
265+
You can find more tips on how to use this tool on [its site](https://ledmatrix-editor.arduino.cc).
235266

236267
## Conclusion
237268
In this article we've gone over the basics of using the LED matrix built in on the Arduino UNO R4 WiFi, we've gone over the different practices for building frames and animations, as well as how to load them onto your board.

0 commit comments

Comments
 (0)