File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change 44import board
55import displayio
66import time
7- import terminalio
8- import fontio
9- import sys
10- import busio
117
128# from adafruit_st7789 import ST7789
139from adafruit_ili9341 import ILI9341
1410from adafruit_display_text import label
11+ from adafruit_bitmap_font import bitmap_font
1512
1613# Setup the SPI display
1714
2724
2825while not spi .try_lock ():
2926 spi .configure (baudrate = 32000000 )
30- pass
3127spi .unlock ()
3228
3329display_bus = displayio .FourWire (
5652
5753display .show (None )
5854
59- # font=terminalio.FONT
60-
61- from adafruit_bitmap_font import bitmap_font
55+ # font=terminalio.FONT # this is the Builtin fixed dimension font
6256
6357font = bitmap_font .load_font ("fonts/BitstreamVeraSans-Roman-24.bdf" )
6458
10599
106100while True :
107101 time .sleep (2 )
108- text_area [
109- 0
110- ]. text = "text" # change some text in an existing text box (must fit within existing # of characters)
102+ text_area [0 ]. text = "text" # change some text in an existing text box
103+ # Note: changed text must fit within existing number of characters
104+ # when the Label was created
111105
112106 for area in text_area :
113107 area .background_color = 0xFF0000
You can’t perform that action at this time.
0 commit comments