Skip to content

Commit 5d68fe9

Browse files
committed
Support Modulino LED Matrix
ATTENTION: the firmware included will ONLY work on led matrix modulinos
1 parent 79e93cd commit 5d68fe9

File tree

6 files changed

+2387
-1162
lines changed

6 files changed

+2387
-1162
lines changed

examples/MatrixIntro/MatrixIntro.ino

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
Heart Animation Sketch
3+
4+
This is the default sketch that comes
5+
shipped with every UNO R4 WiFi board.
6+
7+
After the animation (a heart) is complete,
8+
the built-in LED blinks infinitely.
9+
10+
No additional circuit required.
11+
12+
created 26 Jun 2023
13+
by Martino Facchin
14+
15+
See the full documentation here:
16+
https://docs.arduino.cc/tutorials/uno-r4-wifi/led-matrix
17+
*/
18+
19+
20+
// include the LED Matrix library from the Uno R4 core:
21+
#include "Modulino_LED_Matrix.h"
22+
// make an instance of the library:
23+
ModulinoLEDMatrix matrix;
24+
//include the "animation.h" header file that stores the frames for the animation
25+
#include "animation.h"
26+
27+
void setup() {
28+
Serial.begin(115200);
29+
//load frames from the animation.h file
30+
matrix.loadSequence(frames);
31+
// start the matrix
32+
matrix.begin();
33+
34+
// turn on autoscroll to avoid calling next() to show the next frame; the paramenter is in milliseconds
35+
// matrix.autoscroll(300);
36+
37+
//play the animation on the matrix
38+
matrix.play(true);
39+
40+
//define LED_BUILTIN as an output
41+
pinMode(LED_BUILTIN, OUTPUT);
42+
}
43+
44+
void loop() {
45+
//blinks the built-in LED every second
46+
digitalWrite(LED_BUILTIN, HIGH);
47+
delay(1000);
48+
digitalWrite(LED_BUILTIN, LOW);
49+
delay(1000);
50+
}

0 commit comments

Comments
 (0)