Skip to content

Commit 0f337b8

Browse files
authored
Merge pull request #2 from adafruit/master
merge from adafruit
2 parents 2ab443f + 957335c commit 0f337b8

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

examples/display_text_matrixportal.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"""
2+
This example shows how to create a display_text label and show it
3+
with a Matrix Portal
4+
5+
Requires:
6+
adafruit_matrixportal - https://github.com/adafruit/Adafruit_CircuitPython_MatrixPortal
7+
8+
Copy it from the current libraries bundle into the lib folder on your device.
9+
"""
10+
import terminalio
11+
from adafruit_matrixportal.matrix import Matrix
12+
from adafruit_display_text import label
13+
14+
matrix = Matrix()
15+
display = matrix.display
16+
17+
text = "Hello\nworld"
18+
text_area = label.Label(terminalio.FONT, text=text)
19+
text_area.x = 1
20+
text_area.y = 4
21+
display.show(text_area)
22+
while True:
23+
pass

0 commit comments

Comments
 (0)