diff --git a/examples/display_text_pyportal.py b/examples/display_text_pyportal.py index 5725d4e..9f40a52 100644 --- a/examples/display_text_pyportal.py +++ b/examples/display_text_pyportal.py @@ -36,7 +36,10 @@ y += area.height # Wait for the image to load. - board.DISPLAY.wait_for_frame() + try: + board.DISPLAY.refresh(target_frames_per_second=60) + except AttributeError: + board.DISPLAY.wait_for_frame() # Wait for 10 minutes (600 seconds) time.sleep(600) diff --git a/examples/display_text_textarea_boundingbox.py b/examples/display_text_textarea_boundingbox.py index ac981b8..ce6e1fd 100644 --- a/examples/display_text_textarea_boundingbox.py +++ b/examples/display_text_textarea_boundingbox.py @@ -53,8 +53,11 @@ x=text.x+dims[0], y=text.y+dims[1]) splash.append(textbg_sprite) splash.append(text) -board.DISPLAY.refresh_soon() -board.DISPLAY.wait_for_frame() +try: + board.DISPLAY.refresh(target_frames_per_second=60) +except AttributeError: + board.DISPLAY.refresh_soon() + board.DISPLAY.wait_for_frame() while True: