diff --git a/CLUE_Rock_Paper_Scissors/advanced/rps_display.py b/CLUE_Rock_Paper_Scissors/advanced/rps_display.py index 509399a74..b699418ec 100644 --- a/CLUE_Rock_Paper_Scissors/advanced/rps_display.py +++ b/CLUE_Rock_Paper_Scissors/advanced/rps_display.py @@ -82,7 +82,7 @@ def blankScreen(disp, pix): if disp is None: return - disp.show(Group()) + disp.root_group = Group() class RPSDisplay(): @@ -200,7 +200,7 @@ class RPSDisplay(): def showGroup(self, new_group): self.disp_group = new_group - self.disp.show(new_group) + self.disp.root_group = new_group def emptyGroup(self, dio_group): diff --git a/CLUE_Rock_Paper_Scissors/simple/code.py b/CLUE_Rock_Paper_Scissors/simple/code.py index 7dbabc80f..3c412b28e 100644 --- a/CLUE_Rock_Paper_Scissors/simple/code.py +++ b/CLUE_Rock_Paper_Scissors/simple/code.py @@ -223,7 +223,7 @@ setCursor(my_choice_idx, "your") opp_cursor_dob.y = top_y_pos screen_group.append(opp_cursor_dob) -display.show(screen_group) +display.root_group = screen_group # From adafruit_ble.advertising MANUFACTURING_DATA_ADT = 0xFF diff --git a/CLUE_Servo_Barometer/code.py b/CLUE_Servo_Barometer/code.py index 0f205a62b..f616f6ccf 100644 --- a/CLUE_Servo_Barometer/code.py +++ b/CLUE_Servo_Barometer/code.py @@ -56,7 +56,7 @@ group.append(press_label) group.append(temp_data) group.append(press_data) -display.show(group) +display.root_group = group # function to convert celcius to fahrenheit def c_to_f(temp): diff --git a/CPB_AMS_Gizmo_BLE/code.py b/CPB_AMS_Gizmo_BLE/code.py index f4f8c766a..cd8788f57 100755 --- a/CPB_AMS_Gizmo_BLE/code.py +++ b/CPB_AMS_Gizmo_BLE/code.py @@ -78,7 +78,7 @@ def set_status(label, action_text, player): display = tft_gizmo.TFT_Gizmo() group = displayio.Group() -display.show(group) +display.root_group = group while True: if not radio.connected: diff --git a/CPB_ANCS/code.py b/CPB_ANCS/code.py index 04c54d2a0..6c93b87a9 100644 --- a/CPB_ANCS/code.py +++ b/CPB_ANCS/code.py @@ -106,7 +106,7 @@ def wrap_in_tilegrid(filename:str): display = tft_gizmo.TFT_Gizmo() group = displayio.Group() group.append(wrap_in_tilegrid("/ancs_connect.bmp")) -display.show(group) +display.root_group = group current_notification = None current_notifications = {} diff --git a/CircuitPython_DVI_Hello_World/code.py b/CircuitPython_DVI_Hello_World/code.py index 7ecacd874..0512def72 100644 --- a/CircuitPython_DVI_Hello_World/code.py +++ b/CircuitPython_DVI_Hello_World/code.py @@ -320,7 +320,7 @@ def sensor_values(): clean_up(group) group.scale = 1 -display.show(group) +display.root_group = group while True: show_shapes() diff --git a/CircuitPython_Display_Text/background_color_example/code.py b/CircuitPython_Display_Text/background_color_example/code.py index ee72813ed..ae50e6d40 100644 --- a/CircuitPython_Display_Text/background_color_example/code.py +++ b/CircuitPython_Display_Text/background_color_example/code.py @@ -14,7 +14,7 @@ display = board.DISPLAY # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group reg_label = label.Label( font=terminalio.FONT, diff --git a/CircuitPython_Display_Text/background_tight_example/code.py b/CircuitPython_Display_Text/background_tight_example/code.py index bee3444f2..343fcb7ab 100644 --- a/CircuitPython_Display_Text/background_tight_example/code.py +++ b/CircuitPython_Display_Text/background_tight_example/code.py @@ -15,7 +15,7 @@ display = board.DISPLAY # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group font = bitmap_font.load_font("fonts/Fayette-HandwrittenScript-48.bdf") diff --git a/CircuitPython_Display_Text/base_alignment_test/code.py b/CircuitPython_Display_Text/base_alignment_test/code.py index df627cf45..f3447d7af 100644 --- a/CircuitPython_Display_Text/base_alignment_test/code.py +++ b/CircuitPython_Display_Text/base_alignment_test/code.py @@ -15,7 +15,7 @@ display = board.DISPLAY # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group # Font definition. You can choose any two fonts available in your system @@ -70,7 +70,7 @@ right_text_aligned = label.Label( ) main_group.append(right_text_aligned) -display.show(main_group) +display.root_group = main_group while True: pass diff --git a/CircuitPython_Display_Text/color_example/code.py b/CircuitPython_Display_Text/color_example/code.py index 1eab68ead..b3794b359 100644 --- a/CircuitPython_Display_Text/color_example/code.py +++ b/CircuitPython_Display_Text/color_example/code.py @@ -14,7 +14,7 @@ display = board.DISPLAY # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group reg_label = label.Label( font=terminalio.FONT, diff --git a/CircuitPython_Display_Text/display_text_anchored_position/code.py b/CircuitPython_Display_Text/display_text_anchored_position/code.py index 650e935d3..6e2aa379f 100644 --- a/CircuitPython_Display_Text/display_text_anchored_position/code.py +++ b/CircuitPython_Display_Text/display_text_anchored_position/code.py @@ -15,7 +15,7 @@ display = board.DISPLAY # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group DISPLAY_WIDTH = 320 DISPLAY_HEIGHT = 240 TEXT = "Hello" @@ -75,7 +75,7 @@ text_group.append(text_area_bottom_middle) text_group.append(text_area_bottom_left) text_group.append(text_area_bottom_right) -display.show(text_group) +display.root_group = text_group while True: pass diff --git a/CircuitPython_Display_Text/font_example/code.py b/CircuitPython_Display_Text/font_example/code.py index e66b0c69d..09f2ebc6a 100644 --- a/CircuitPython_Display_Text/font_example/code.py +++ b/CircuitPython_Display_Text/font_example/code.py @@ -16,7 +16,7 @@ display = board.DISPLAY # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group font = bitmap_font.load_font("fonts/LeagueSpartan-Bold-16.bdf") # font = terminalio.FONT diff --git a/CircuitPython_Display_Text/line_spacing_example/code.py b/CircuitPython_Display_Text/line_spacing_example/code.py index d3cc6a084..2a9a3372c 100644 --- a/CircuitPython_Display_Text/line_spacing_example/code.py +++ b/CircuitPython_Display_Text/line_spacing_example/code.py @@ -14,7 +14,7 @@ display = board.DISPLAY # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group # font = bitmap_font.load_font("Fayette-HandwrittenScript-48.bdf") font = terminalio.FONT diff --git a/CircuitPython_Display_Text/padding_example/code.py b/CircuitPython_Display_Text/padding_example/code.py index 34497925f..23c909cc5 100644 --- a/CircuitPython_Display_Text/padding_example/code.py +++ b/CircuitPython_Display_Text/padding_example/code.py @@ -14,7 +14,7 @@ display = board.DISPLAY # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group # font = bitmap_font.load_font("Fayette-HandwrittenScript-48.bdf") font = terminalio.FONT diff --git a/CircuitPython_Display_Text/updating_text_example/code.py b/CircuitPython_Display_Text/updating_text_example/code.py index 4db2fc57e..c80544b4b 100644 --- a/CircuitPython_Display_Text/updating_text_example/code.py +++ b/CircuitPython_Display_Text/updating_text_example/code.py @@ -15,7 +15,7 @@ display = board.DISPLAY # Make the display context main_group = displayio.Group() -display.show(main_group) +display.root_group = main_group # create the label updating_label = label.Label( diff --git a/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py b/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py index 2cae7bf05..855a8becc 100644 --- a/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py +++ b/CircuitPython_ESP32_Camera/esp32-kaluga-onionskin-gif/code.py @@ -147,7 +147,7 @@ next_filename("gif") # Blank the whole display g = displayio.Group() -display.show(g) +display.root_group = g display.auto_refresh = False display.refresh() diff --git a/CircuitPython_Flying_Toasters/code.py b/CircuitPython_Flying_Toasters/code.py index f96a9fd27..aa8fa3696 100644 --- a/CircuitPython_Flying_Toasters/code.py +++ b/CircuitPython_Flying_Toasters/code.py @@ -81,7 +81,7 @@ def make_tilegrid(): x=0, y=-64, default_tile=EMPTY) group.append(grid) - display.show(group) + display.root_group = group return grid diff --git a/CircuitPython_GameAndWatch_Octopus/code.py b/CircuitPython_GameAndWatch_Octopus/code.py index bf469af3c..31c841a7b 100644 --- a/CircuitPython_GameAndWatch_Octopus/code.py +++ b/CircuitPython_GameAndWatch_Octopus/code.py @@ -37,7 +37,7 @@ buttons = keypad.ShiftRegisterKeys( ) # show the main group on the display -display.show(main_group) +display.root_group = main_group # main loop while True: diff --git a/CircuitPython_JEplayer_mp3/code.py b/CircuitPython_JEplayer_mp3/code.py index 64ed97c4b..d4d57c64c 100644 --- a/CircuitPython_JEplayer_mp3/code.py +++ b/CircuitPython_JEplayer_mp3/code.py @@ -57,7 +57,7 @@ from micropython import const def clear_display(): """Display nothing""" - board.DISPLAY.show(displayio.Group()) + board.DISPLAY.root_group = displayio.Group() clear_display() @@ -293,7 +293,7 @@ speaker.play(mp3stream) font = adafruit_bitmap_font.bitmap_font.load_font("rsrc/5x8.pcf") playback_display = PlaybackDisplay() -board.DISPLAY.show(playback_display.group) +board.DISPLAY.root_group = playback_display.group font.load_glyphs(range(32, 128)) joystick = analogjoy.AnalogJoystick() @@ -358,7 +358,7 @@ def menu_choice(seq, *, sel_idx=0, text_font=font): last_scroll_idx = max(0, len(seq) - num_rows) - board.DISPLAY.show(scene) + board.DISPLAY.root_group = scene buttons.events.clear() i = 0 old_scroll_idx = None @@ -472,7 +472,7 @@ def play_all(playlist, *, folder='', trim=0, location='/sd'): 'folder' is a display name for the user.""" i = 0 - board.DISPLAY.show(playback_display.group) + board.DISPLAY.root_group = playback_display.group playback_display.iconbar.group.y = 112 while 0 <= i < len(playlist): filename = playlist[i] @@ -520,7 +520,7 @@ def main(): error_text.y = board.DISPLAY.height // 2 g = displayio.Group() g.append(error_text) - board.DISPLAY.show(g) + board.DISPLAY.root_group = g while True: time.sleep(1) diff --git a/CircuitPython_KeyPad_Calculator/code/code.py b/CircuitPython_KeyPad_Calculator/code/code.py index 45e91c5c7..1b6d58b8d 100644 --- a/CircuitPython_KeyPad_Calculator/code/code.py +++ b/CircuitPython_KeyPad_Calculator/code/code.py @@ -69,7 +69,7 @@ display.auto_refresh = False font = bitmap_font.load_font("/digit-16px.pcf") text_area = label.Label(font, text=" ", line_spacing=0.95) text_area.y = 8 -display.show(text_area) +display.root_group = text_area N = float diff --git a/CircuitPython_Knob_Sketcher/feather_sketcher/code.py b/CircuitPython_Knob_Sketcher/feather_sketcher/code.py index c80001caf..789e1331b 100755 --- a/CircuitPython_Knob_Sketcher/feather_sketcher/code.py +++ b/CircuitPython_Knob_Sketcher/feather_sketcher/code.py @@ -62,7 +62,7 @@ display = adafruit_ili9341.ILI9341(display_bus, width=DISPLAY_WIDTH, height=DISP # add base UI element splash = displayio.Group(scale=SKETCH_SCALE) -display.show(splash) +display.root_group = splash # add sketch sketch_bitmap = displayio.Bitmap(SKETCH_WIDTH, SKETCH_HEIGHT, 2) diff --git a/CircuitPython_Neko_Cat/code.py b/CircuitPython_Neko_Cat/code.py index 216a42a99..d77a75347 100644 --- a/CircuitPython_Neko_Cat/code.py +++ b/CircuitPython_Neko_Cat/code.py @@ -580,7 +580,7 @@ neko.y = display.height // 2 - neko.TILE_HEIGHT // 2 main_group.append(neko) # show main_group on the display -display.show(main_group) +display.root_group = main_group if USE_TOUCH_OVERLAY: # initialize laser palette diff --git a/CircuitPython_OLED_Watch/code.py b/CircuitPython_OLED_Watch/code.py index e85cf6d93..247c8845c 100755 --- a/CircuitPython_OLED_Watch/code.py +++ b/CircuitPython_OLED_Watch/code.py @@ -73,4 +73,4 @@ while True: watch_group.append(date) watch_group.append(text) - oled.show(watch_group) + oled.root_group = watch_group diff --git a/CircuitPython_RGBMatrix/fruit/code.py b/CircuitPython_RGBMatrix/fruit/code.py index 2541f2065..f63b72bd5 100644 --- a/CircuitPython_RGBMatrix/fruit/code.py +++ b/CircuitPython_RGBMatrix/fruit/code.py @@ -111,7 +111,7 @@ for idx in range(3): wheel.y = -20 g.append(wheel) wheels.append(wheel) -display.show(g) +display.root_group = g # Make a unique order of the emoji on each wheel orders = [shuffled(range(20)), shuffled(range(20)), shuffled(range(20))] diff --git a/CircuitPython_RGBMatrix/life/code.py b/CircuitPython_RGBMatrix/life/code.py index e902dac1c..c3ee86984 100644 --- a/CircuitPython_RGBMatrix/life/code.py +++ b/CircuitPython_RGBMatrix/life/code.py @@ -91,7 +91,7 @@ tg1 = displayio.TileGrid(b1, pixel_shader=palette) tg2 = displayio.TileGrid(b2, pixel_shader=palette) g1 = displayio.Group(scale=SCALE) g1.append(tg1) -display.show(g1) +display.root_group = g1 g2 = displayio.Group(scale=SCALE) g2.append(tg2) @@ -108,9 +108,9 @@ while True: # values, 400 frames seems like a good number. Working in this way, with # two bitmaps, reduces copying data and makes the animation a bit faster for _ in range(n): - display.show(g1) + display.root_group = g1 apply_life_rule(b1, b2) - display.show(g2) + display.root_group = g2 apply_life_rule(b2, b1) # After 2*n generations, fill the board with random values and diff --git a/CircuitPython_RGBMatrix/rp2040/code.py b/CircuitPython_RGBMatrix/rp2040/code.py index e618d6a82..6499a38da 100644 --- a/CircuitPython_RGBMatrix/rp2040/code.py +++ b/CircuitPython_RGBMatrix/rp2040/code.py @@ -30,7 +30,7 @@ g.append(t) l = Label(text="Feather\nRP2040", font=terminalio.FONT, color=0xffffff, line_spacing=.7) g.append(l) -display.show(g) +display.root_group = g target_fps = 50 ft = 1/target_fps diff --git a/CircuitPython_RGBMatrix/scroller/code.py b/CircuitPython_RGBMatrix/scroller/code.py index 5068358e8..f4effc206 100644 --- a/CircuitPython_RGBMatrix/scroller/code.py +++ b/CircuitPython_RGBMatrix/scroller/code.py @@ -44,7 +44,7 @@ l1 = displayio.Group() l2 = displayio.Group() g.append(l1) g.append(l2) -display.show(g) +display.root_group = g l1.y = 1 l2.y = 16 diff --git a/CircuitPython_RGBMatrix/simple_scroller/code.py b/CircuitPython_RGBMatrix/simple_scroller/code.py index acf4ad3e5..c94574271 100644 --- a/CircuitPython_RGBMatrix/simple_scroller/code.py +++ b/CircuitPython_RGBMatrix/simple_scroller/code.py @@ -60,7 +60,7 @@ line2.y = 24 g = displayio.Group() g.append(line1) g.append(line2) -display.show(g) +display.root_group = g # This function will scoot one label a pixel to the left and send it back to # the far right if it's gone all the way off screen. This goes in a function diff --git a/CircuitPython_RGBMatrix/tiled/code.py b/CircuitPython_RGBMatrix/tiled/code.py index f2e01a80a..7c63d0343 100755 --- a/CircuitPython_RGBMatrix/tiled/code.py +++ b/CircuitPython_RGBMatrix/tiled/code.py @@ -66,7 +66,7 @@ TILEGRID = displayio.TileGrid( GROUP = displayio.Group() GROUP.append(TILEGRID) -DISPLAY.show(GROUP) +DISPLAY.root_group = GROUP DISPLAY.refresh() # Nothing interactive, just hold the image there