Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
whatever is in Sub MM.STARTUP seems to get executed whenever the Pico restarts, regardless of AUTORUN. If OPTION AUTORUN is set MM.STARTUP runs first.
On my WebMite AUTORUN isn't set, just MM.STARTUP as above and the program runs every time.
Edit. This works reliably for me. After a power outage the WebMite first waits for the modem to boot then waits for the internet to reconnect before starting the main program.
> option list WebMite MMBasic Version 5.08.00RC4 OPTION SYSTEM SPI GP18,GP19,GP16 OPTION COLOURCODE ON OPTION DISPLAY 55, 132 OPTION WIFI WiFi-6BAC, ***************, PICOE6614104031 OPTION TCP SERVER PORT 80 OPTION TELNET CONSOLE ON OPTION SDCARD GP17
> LIST Sub MM.STARTUP Pause 200 On error skip 4 'test for WiFi link If (MM.Info(ip address) = "0.0.0.0") Or (MM.Info(ip address) = "") Then Pause 8000 CPU restart EndIf
Local float TZ = 10, DS = 1 'Time Zone, Daylight Saving Do While Right$(Date$,4) = "2000" 'test for internett connection On error skip 2 WEB NTP TZ+DS, "162.159.200.123" Pause 2000 Loop