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
(Sept. 7th, 2020), which exposes all parameters that affect how the matrix runs.
8
+
9
+
# Usage
10
+
11
+
The examples have more detailed usage, but here is basic usage to get things rendering on your display.
12
+
```rust
13
+
userpi_led_matrix::{LedMatrix, LedColor};
14
+
15
+
letmatrix=LedMatrix::new(None, None).unwrap();
16
+
letmutcanvas=matrix.offscreen_canvas();
17
+
forredin0..255 {
18
+
forgreenin0..255 {
19
+
forbluein0..255 {
20
+
canvas.fill(&LedColor { red, green, blue });
21
+
canvas=matrix.swap(canvas);
22
+
}
23
+
}
24
+
}
25
+
```
26
+
Note that if you have wirings other than the libraries "default", you will need to construct arguments to the library to specify the layout. See `LedMatrixOptions` for more information.
0 commit comments