diff --git a/launcher.py b/launcher.py index 4c367c5..2c60caa 100644 --- a/launcher.py +++ b/launcher.py @@ -5,6 +5,10 @@ import badger2040 import badger_os import jpegdec +from setup import start_setup + +# start the setup process +start_setup() APP_DIR = "/apps" FONT_SIZE = 2 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..daf6e76 --- /dev/null +++ b/setup.py @@ -0,0 +1,13 @@ +from glob import glob + +def start_setup(): + if glob("WIFI_CONFIG.py"): + return + + from network_manager import NetworkManager + import uasyncio + import gc + + network_manager = NetworkManager() + uasyncio.get_event_loop().run_until_complete(network_manager.access_point()) + gc.collect()