Skip to content

Commit 903e652

Browse files
committed
[UNO R4 WiFi] Add Scroll example
Add scroll example and explanation of how to use it.
1 parent 3f91ba6 commit 903e652

File tree

1 file changed

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

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,19 @@ matrix.renderBitmap(frame, 8, 12);
276276
delay(1000);
277277
}
278278
```
279-
279+
280+
## Scrolling Text Example
281+
282+
The LED Matrix now supports printing characters via the [ArduinoGraphics](https://github.com/arduino-libraries/ArduinoGraphics) library. With it, you are able to:
283+
- Set a start location for the text via `matrix.beginText(x,y, 0xFFFFFF)`. The "0xFFFFFF" represents the default color (red). As the **ArduinoGraphics** library supports other hardware with multiple colors, we need to specify it.
284+
- Print the text via `matrix.printText("This message is printed")`
285+
- End the print and (optionally) specify scroll direction with `matrix.endText(direction)`
286+
- `SCROLL_LEFT`, `SCROLL_RIGHT` are supported. Leave blank if no scroll is desired.
287+
288+
The example below simply prints out **"Hello World!"** on the matrix.
289+
290+
<CodeBlock url="https://github.com/arduino/ArduinoCore-renesas/blob/main/libraries/Arduino_LED_Matrix/examples/TextWithArduinoGraphics/TextWithArduinoGraphics.ino" className="arduino"/>
291+
280292
## Animation Generation
281293
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.
282294

0 commit comments

Comments
 (0)