Display splash screen on app start

This commit is contained in:
Gabriel Augendre 2023-04-27 11:47:49 +02:00
parent 54ca275810
commit be47d32940

View file

@ -1,6 +1,5 @@
import urequests import urequests
import jpegdec import jpegdec
from pcf85063a import PCF85063A
from badger2040 import ( from badger2040 import (
WIDTH, WIDTH,
@ -246,8 +245,18 @@ def get_time():
return fix_dst(*display.rtc.datetime()) return fix_dst(*display.rtc.datetime())
def splash_screen():
display.set_pen(WHITE)
display.clear()
display.set_pen(BLACK)
display.text("Starting plant app...", 10, 10, 300, 0.5)
display.set_update_speed(UPDATE_FAST)
display.update()
while True: while True:
try: try:
splash_screen()
main() main()
except Exception as e: except Exception as e:
print(e) print(e)