Adafruit_Learning_System_Gu.../CircuitPython_displayio/displayio_text.py
2021-08-21 12:27:37 -05:00

24 lines
420 B
Python

import board
import terminalio
from adafruit_display_text import label
display = board.DISPLAY
# Set text, font, and color
text = "HELLO WORLD"
font = terminalio.FONT
color = 0x0000FF
# Create the text label
text_area = label.Label(font, text=text, color=color)
# Set the location
text_area.x = 100
text_area.y = 80
# Show it
display.show(text_area)
# Loop forever so you can enjoy your image
while True:
pass