Skip to content

Commit 26a9795

Browse files
committed
batch 3
1 parent e6296b1 commit 26a9795

File tree

60 files changed

+101
-115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+101
-115
lines changed

CircuitPython_RPN_Calculator/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def __init__(self):
224224

225225
g.insert(0, bg)
226226

227-
display.show(g)
227+
display.root_group = g
228228

229229
def getch(self):
230230
while True:

CircuitPython_Scrolling_Clouds/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def make_tilegrid():
7171
tile_height=48, tile_width=32,
7272
default_tile=EMPTY)
7373
group.append(grid)
74-
display.show(group)
74+
display.root_group = group
7575
return grid
7676

7777

CircuitPython_SharpDisplay_Displayio/code.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def sample(population, k):
166166

167167
# Create a Group for the BLM text
168168
blm_group = displayio.Group()
169-
display.show(blm_group)
169+
display.root_group = blm_group
170170

171171
# Create a 3 line set of text for BLM
172172
blm_font = [None, None, None]
@@ -204,7 +204,7 @@ def sample(population, k):
204204

205205
# Repeatedly show the BLM slogan and then 5 names.
206206
while True:
207-
display.show(blm_group)
207+
display.root_group = blm_group
208208

209209
# Show the BLM slogan
210210
with BatchDisplayUpdate(display):
@@ -227,7 +227,7 @@ def sample(population, k):
227227
time.sleep(2)
228228

229229
# Show 5 names
230-
display.show(name_group)
230+
display.root_group = name_group
231231
for name in sample(names, 5):
232232
print(name)
233233
lines = name.split(" ")

CircuitPython_Sip_and_Puff/puff_detector.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,4 +290,4 @@ def _update_display(self):
290290
splash.append(high_pressure_label)
291291
splash.append(pressure_label)
292292

293-
self.display.show(splash)
293+
self.display.root_group = splash

CircuitPython_Slider/code.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
begin = time.monotonic()
125125
print(begin)
126126
# when feather is powered up it shows the initial graphic splash
127-
minitft.display.show(graphics[mode])
127+
minitft.display.root_group = graphics[mode]
128128

129129
while True:
130130
# setup minitft featherwing buttons
@@ -153,7 +153,7 @@
153153
if mode > 3:
154154
mode = 0
155155
print("Mode:,", mode)
156-
minitft.display.show(graphics[mode])
156+
minitft.display.root_group = graphics[mode]
157157
# scroll up to change slide duration and graphic
158158
if buttons.up and up_state == "pressed":
159159
# blocks the button if the slider is sliding or
@@ -167,10 +167,10 @@
167167
if mode < 0:
168168
mode = 3
169169
print("Mode: ", mode)
170-
minitft.display.show(graphics[mode])
170+
minitft.display.root_group = graphics[mode]
171171
# workaround so that the menu graphics show after a slide is finished
172172
if mode == mode and pause == 0 and onOff == 0:
173-
minitft.display.show(graphics[mode])
173+
minitft.display.root_group = graphics[mode]
174174
# starts slide
175175
if buttons.select and select_state == "pressed" or z == 2:
176176
# blocks the button if the slider is sliding or
@@ -180,7 +180,7 @@
180180
select_state = None
181181
else:
182182
# shows the slider is sliding graphic
183-
minitft.display.show(progBarGroup)
183+
minitft.display.root_group = progBarGroup
184184
# gets time of button press
185185
press = time.monotonic()
186186
print(press)
@@ -230,7 +230,7 @@
230230
check = 0
231231
if end < 10:
232232
# displays the stopping graphic for the last 10 secs.
233-
minitft.display.show(stopGroup)
233+
minitft.display.root_group = stopGroup
234234
# changes states after slide has completed
235235
kit.stepper1.release()
236236
pause = 1
@@ -240,7 +240,7 @@
240240
# delay for safety
241241
time.sleep(2)
242242
# shows choice menu
243-
minitft.display.show(reverseqGroup)
243+
minitft.display.root_group = reverseqGroup
244244
# b is defined to stop the slider
245245
# only active if the slider is in the 'stopped' state
246246
if buttons.b and b_state == "pressed" and stop == 1:
@@ -249,7 +249,7 @@
249249
if z == 0:
250250
b_state = None
251251
time.sleep(1)
252-
minitft.display.show(backingUpGroup)
252+
minitft.display.root_group = backingUpGroup
253253
# delay for safety
254254
time.sleep(2)
255255
# brings camera back to 'home' at double speed
@@ -286,7 +286,7 @@
286286
a_state = None
287287
# same script as the 'regular' slide loop
288288
time.sleep(2)
289-
minitft.display.show(progBarGroup)
289+
minitft.display.root_group = progBarGroup
290290
press = time.monotonic()
291291
print(press)
292292
text_area.text = slide_begin[mode]
@@ -322,7 +322,7 @@
322322
if check > 19:
323323
check = 0
324324
if end < 10:
325-
minitft.display.show(stopGroup)
325+
minitft.display.root_group = stopGroup
326326
# state changes
327327
kit.stepper1.release()
328328
pause = 1
@@ -331,4 +331,4 @@
331331
z = 1
332332
check = 0
333333
time.sleep(2)
334-
minitft.display.show(reverseqGroup)
334+
minitft.display.root_group = reverseqGroup

CircuitPython_Touch_Deck/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
# Make the main_group to hold everything
5757
main_group = displayio.Group()
58-
display.show(main_group)
58+
display.root_group = main_group
5959

6060
# loading screen
6161
loading_group = displayio.Group()

CircuitPython_displayio/displayio_display_driver/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
group = displayio.Group()
4242
group.append(tile_grid)
43-
display.show(group)
43+
display.root_group = group
4444

4545
# Loop forever so you can enjoy your image
4646
while True:

CircuitPython_displayio/displayio_display_manual/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
group = displayio.Group()
6969
group.append(tile_grid)
70-
display.show(group)
70+
display.root_group = group
7171

7272
# Loop forever so you can enjoy your image
7373
while True:

CircuitPython_displayio/displayio_font/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
text_area.y = 20
2222

2323
# Show it
24-
display.show(text_area)
24+
display.root_group = text_area
2525

2626
# Loop forever so you can enjoy your text
2727
while True:

CircuitPython_displayio/displayio_imageload/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
group.append(tile_grid)
2323

2424
# Add the Group to the Display
25-
display.show(group)
25+
display.root_group = group
2626

2727
# Loop forever so you can enjoy your image
2828
while True:

CircuitPython_displayio/displayio_ondiskbitmap/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
group.append(tile_grid)
2121

2222
# Add the Group to the Display
23-
display.show(group)
23+
display.root_group = group
2424

2525
# Loop forever so you can enjoy your image
2626
while True:

CircuitPython_displayio/displayio_parallelbus/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
group = displayio.Group()
6767
group.append(tile_grid)
68-
display.show(group)
68+
display.root_group = group
6969

7070
# Loop forever so you can enjoy your image
7171
while True:

CircuitPython_displayio/displayio_pixels/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
group.append(tile_grid)
2626

2727
# Add the Group to the Display
28-
display.show(group)
28+
display.root_group = group
2929

3030
# Draw a pixel
3131
bitmap[80, 50] = 1

CircuitPython_displayio/displayio_sprite_sheet/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
group.append(sprite)
2929

3030
# Add the Group to the Display
31-
display.show(group)
31+
display.root_group = group
3232

3333
# Set sprite location
3434
group.x = 120

CircuitPython_displayio/displayio_tilegrids/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
sprite.y = 70
6868

6969
# Add the Group to the Display
70-
display.show(group)
70+
display.root_group = grouphttps://learn.adafruit.com/circuitpython-display-support-using-displayio/tilegrid-and-group
7171

7272
# Loop forever so you can enjoy your image
7373
while True:

CircuitPython_qrio/adafruit_io/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
g = displayio.Group()
101101
g.append(g1)
102102
g.append(label)
103-
display.show(g)
103+
display.root_group = g
104104
display.auto_refresh = False
105105

106106
old_payload = None

CircuitPython_qrio/repl/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
g = displayio.Group()
7474
g.append(g1)
7575
g.append(label)
76-
display.show(g)
76+
display.root_group = g
7777
display.auto_refresh = False
7878

7979
old_payload = None

CircuitPython_qrio/usb_hid/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
g = displayio.Group()
8282
g.append(g1)
8383
g.append(label)
84-
display.show(g)
84+
display.root_group = g
8585
display.auto_refresh = False
8686

8787
i = 0

CircuitPython_sdcardio_sdioio/show_bitmaps/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
group = displayio.Group()
3737
group.append(tile_grid)
38-
display.show(group)
38+
display.root_group = group
3939

4040
# Show the image for 10 seconds
4141
time.sleep(10)

CircuitStonks/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
group.append(symbol_text)
5252
group.append(price_text)
5353
group.append(change_text)
54-
minitft.display.show(group)
54+
minitft.display.root_group = group
5555

5656
refresh = None
5757
i = 0

Circuit_Playground_O_Phonor/notes_tft/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
splash.append(note_text)
7373
splash.append(oct_text)
7474
splash.append(freq_text)
75-
display.show(splash)
75+
display.root_group = splash
7676

7777
while True:
7878
# Get raw mic data

Circuit_Playground_Sailor_Moon_Star_Locket/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
main_group.append(jewel_splash)
6161

6262
# showing the main group on the display
63-
display.show(main_group)
63+
display.root_group = main_group
6464

6565
# tracks the tilegrid index location for the crescent moon
6666
moon = 0

Clue_Scale/code.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
indicator_group.append(bubble)
115115

116116
scale_group.append(indicator_group)
117-
display.show(scale_group)
117+
display.root_group = scale_group
118118

119119

120120
# Helpers

0 commit comments

Comments
 (0)