You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/02.hero/boards/uno-r4-wifi/tutorials/led-matrix/led-matrix.md
+93-4
Original file line number
Diff line number
Diff line change
@@ -277,6 +277,10 @@ delay(1000);
277
277
}
278
278
```
279
279
280
+
## Resources
281
+
282
+
The rest of this article is a collection of resources, such as functioning examples, a gallery of frames, and tools that can help you get started with the LED Matrix in different ways.
283
+
280
284
## Scrolling Text Example
281
285
282
286
The LED Matrix now supports printing characters via the [ArduinoGraphics](https://github.com/arduino-libraries/ArduinoGraphics) library. With it, you are able to:
@@ -332,6 +336,95 @@ void loop() {
332
336
}
333
337
```
334
338
339
+
## Frame Gallery
340
+
341
+
We've designed a gallery of frames and animations that are included in the library! You may load and display them on your UNO R4 WiFi with the following code snippet:
342
+
343
+
```arduino
344
+
#include "Arduino_LED_Matrix.h" // Include the LED_Matrix library
345
+
#include "frames.h" // Include a header file containing some custom icons
346
+
347
+
ArduinoLEDMatrix matrix; // Create an instance of the ArduinoLEDMatrix class
348
+
349
+
void setup() {
350
+
Serial.begin(115200); // Initialize serial communication at a baud rate of 115200
351
+
matrix.begin(); // Initialize the LED matrix
352
+
353
+
}
354
+
355
+
void loop() {
356
+
// Load and display the basic emoji frame on the LED matrix
357
+
matrix.loadFrame(LEDMATRIX_EMOJI_BASIC);
358
+
}
359
+
```
360
+
361
+
By changing the parameter in `matrix.loadFrame()` in the loop, you can choose among the available frames we designed.
362
+
363
+
The available frames are:
364
+
-`LEDMATRIX_BLUETOOTH`
365
+
-`LEDMATRIX_BOOTLOADER_ON`
366
+
-`LEDMATRIX_CHIP`
367
+
-`LEDMATRIX_CLOUD_WIFI`
368
+
-`LEDMATRIX_DANGER`
369
+
-`LEDMATRIX_EMOJI_BASIC`
370
+
-`LEDMATRIX_EMOJI_HAPPY`
371
+
-`LEDMATRIX_EMOJI_SAD`
372
+
-`LEDMATRIX_HEART_BIG`
373
+
-`LEDMATRIX_HEART_SMALL`
374
+
-`LEDMATRIX_LIKE`
375
+
-`LEDMATRIX_MUSIC_NOTE`
376
+
-`LEDMATRIX_RESISTOR`
377
+
-`LEDMATRIX_UNO`
378
+
379
+
Alternatively, play one of the animations on the LED matrix like this:
380
+
381
+
```arduino
382
+
#include "Arduino_LED_Matrix.h" //Include the LED_Matrix library
// Create an instance of the ArduinoLEDMatrix class
386
+
ArduinoLEDMatrix matrix;
387
+
388
+
void setup() {
389
+
Serial.begin(115200);
390
+
// you can also load frames at runtime, without stopping the refresh
391
+
matrix.loadSequence(LEDMATRIX_ANIMATION_STARTUP);
392
+
matrix.begin();
393
+
matrix.play(true);
394
+
}
395
+
396
+
void loop() {
397
+
}
398
+
```
399
+
In this case, you change the parameter of `matrix.loadSequence()` in the setup to one of the available ones to display.
400
+
401
+
The available animations are:
402
+
-`LEDMATRIX_ANIMATION_STARTUP`
403
+
-`LEDMATRIX_ANIMATION_TETRIS_INTRO`
404
+
-`LEDMATRIX_ANIMATION_ATMEGA`
405
+
-`LEDMATRIX_ANIMATION_LED_BLINK_HORIZONTAL`
406
+
-`LEDMATRIX_ANIMATION_LED_BLINK_VERTICAL`
407
+
-`LEDMATRIX_ANIMATION_ARROWS_COMPASS`
408
+
-`LEDMATRIX_ANIMATION_AUDIO_WAVEFORM`
409
+
-`LEDMATRIX_ANIMATION_BATTERY`
410
+
-`LEDMATRIX_ANIMATION_BOUNCING_BALL`
411
+
-`LEDMATRIX_ANIMATION_BUG`
412
+
-`LEDMATRIX_ANIMATION_CHECK`
413
+
-`LEDMATRIX_ANIMATION_CLOUD`
414
+
-`LEDMATRIX_ANIMATION_DOWNLOAD`
415
+
-`LEDMATRIX_ANIMATION_DVD`
416
+
-`LEDMATRIX_ANIMATION_HEARTBEAT_LINE`
417
+
-`LEDMATRIX_ANIMATION_HEARTBEAT`
418
+
-`LEDMATRIX_ANIMATION_INFINITY_LOOP_LOADER`
419
+
-`LEDMATRIX_ANIMATION_LOAD_CLOCK`
420
+
-`LEDMATRIX_ANIMATION_LOAD`
421
+
-`LEDMATRIX_ANIMATION_LOCK`
422
+
-`LEDMATRIX_ANIMATION_NOTIFICATION`
423
+
-`LEDMATRIX_ANIMATION_OPENSOURCE`
424
+
-`LEDMATRIX_ANIMATION_SPINNING_COIN`
425
+
-`LEDMATRIX_ANIMATION_TETRIS`
426
+
-`LEDMATRIX_ANIMATION_WIFI_SEARCH`
427
+
335
428
## Animation Generation
336
429
We have developed a tool that is used to generate frames and animations to be rendered on the LED Matrix in your browser. This tool is part of [Arduino labs](https://labs.arduino.cc), and is therefore considered experimental software.
337
430
@@ -372,10 +465,6 @@ Once you've made your animations, you can export them from the tool in the forma
372
465
373
466
You can find more tips on how to use this tool on [its site](https://ledmatrix-editor.arduino.cc).
374
467
375
-
## Conclusion
376
-
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.
377
-
378
-
Have fun creating interactive interfaces or animation on your UNO R4 WiFi!
0 commit comments