diff --git a/examples/ssd1680_2.13_featherwing.py b/examples/ssd1680_2.13_featherwing.py index b579c56..2732f83 100644 --- a/examples/ssd1680_2.13_featherwing.py +++ b/examples/ssd1680_2.13_featherwing.py @@ -57,4 +57,14 @@ print("refreshed") - time.sleep(120) + time.sleep(display.time_to_refresh + 5) + # Always refresh a little longer. It's not a problem to refresh + # a few seconds more, but it's terrible to refresh too early + # (the display will throw an exception when if the refresh + # is too soon) + print("waited correct time") + + +# Keep the display the same +while True: + time.sleep(10) diff --git a/examples/ssd1680_simpletest.py b/examples/ssd1680_simpletest.py index 9ce4f1f..a545412 100644 --- a/examples/ssd1680_simpletest.py +++ b/examples/ssd1680_simpletest.py @@ -64,4 +64,14 @@ print("refreshed") - time.sleep(120) + time.sleep(display.time_to_refresh + 5) + # Always refresh a little longer. It's not a problem to refresh + # a few seconds more, but it's terrible to refresh too early + # (the display will throw an exception when if the refresh + # is too soon) + print("waited correct time") + + +# Keep the display the same +while True: + time.sleep(10)