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 4
4
import board
5
5
import displayio
6
6
import time
7
- import terminalio
8
- import fontio
9
- import sys
10
- import busio
11
7
12
8
# from adafruit_st7789 import ST7789
13
9
from adafruit_ili9341 import ILI9341
14
10
from adafruit_display_text import label
11
+ from adafruit_bitmap_font import bitmap_font
15
12
16
13
# Setup the SPI display
17
14
27
24
28
25
while not spi .try_lock ():
29
26
spi .configure (baudrate = 32000000 )
30
- pass
31
27
spi .unlock ()
32
28
33
29
display_bus = displayio .FourWire (
56
52
57
53
display .show (None )
58
54
59
- # font=terminalio.FONT
60
-
61
- from adafruit_bitmap_font import bitmap_font
55
+ # font=terminalio.FONT # this is the Builtin fixed dimension font
62
56
63
57
font = bitmap_font .load_font ("fonts/BitstreamVeraSans-Roman-24.bdf" )
64
58
105
99
106
100
while True :
107
101
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
111
105
112
106
for area in text_area :
113
107
area .background_color = 0xFF0000
You can’t perform that action at this time.
0 commit comments