Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions examples/display_text_matrixportal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""
This example shows how to create a display_text label and show it
with a Matrix Portal

Requires:
adafruit_matrixportal - https://github.com/adafruit/Adafruit_CircuitPython_MatrixPortal

Copy it from the current libraries bundle into the lib folder on your device.
"""
import terminalio
from adafruit_matrixportal.matrix import Matrix
from adafruit_display_text import label

matrix = Matrix()
display = matrix.display

text = "Hello\nworld"
text_area = label.Label(terminalio.FONT, text=text)
text_area.x = 1
text_area.y = 4
display.show(text_area)
while True:
pass