Skip to content

Commit ed7f035

Browse files
committed
Elaborate on how to get started.
1 parent 70481ad commit ed7f035

File tree

1 file changed

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

1 file changed

+20
-0
lines changed

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,28 @@ To follow along with this guide, you will of course need:
2626
- and the [Arduino IDE](https://www.arduino.cc/en/software).
2727

2828
## Initializing Matrix
29+
To use the LED Matrix library, there are a few things that need to be added to your sketch to get off the ground.
2930

31+
First, include the library at the top of your sketch, like this:
32+
33+
```arduino
34+
#include "Arduino_LED_Matrix.h"
35+
```
36+
37+
Then, you'll need to create a LED Matrix object in your sketch, by adding the following line directly underneath the first one:
38+
39+
```arduino
40+
ArduinoLEDMatrix matrix;
41+
```
42+
43+
And then lastly, start the led matrix by adding this line in `void setup()`:
44+
```arduino
45+
matrix.begin();
3046
```
47+
48+
The entire thing should look like this;
49+
50+
```arduino
3151
#include "Arduino_LED_Matrix.h"
3252
3353
ArduinoLEDMatrix matrix;

0 commit comments

Comments
 (0)