User Manual

Next let's add a label that says "Hello World!" on top of that. We're going to use the built-in Terminal Font and scale it
up by a factor of three. To scale the label only, we will make use of a subgroup, which we will then add to the main
group.
Labels are centered vertically, so we'll place it at 120 for the Y coordinate, and around 57 pixels make it appear to be
centered horizontally, but if you want to change the text, change this to whatever looks good to you. Let's go with
some yellow text, so we'll pass it a value of 0xFFFF00 .
Finally, we place an infinite loop at the end so that the graphics screen remains in place and isn't replaced by a
terminal.
Where to go from here
Be sure to check out this excellent guide to CircuitPython Display Support Using displayio (https://adafru.it/EGh)
text_group = displayio.Group(max_size=10, scale=3, x=57, y=120)
text = "Hello World!"
text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00)
text_group.append(text_area) # Subgroup for text scaling
splash.append(text_group)
while True:
pass
© Adafruit Industries https://learn.adafruit.com/2-0-inch-320-x-240-color-ips-tft-display Page 24 of 27