'Option wifi' within programs ?


Author Message
damos
Regular Member

Joined: 15/04/2016
Location: Australia
Posts: 81
Posted: 11:42pm 05 Jun 2025      

I have the same problem, and would be quite happy for the system to reboot as soon as it hits the option wifi line of code.

I have a solution for myself. Switch the console to a serial port on the webmite and put the user interface on a second Picomite which sends the option wifi command to the webmite through the serial port. This has the advantage of being able to display friendly messages while the webmite is rebooting.

This means the webmite can have really simple code that just handles the HTTP requests and the picomite drives the touch screen and handles the UI. It can also be used as a watchdog for the webmite. The hardware watchdog really doesn't work well on HTTP as the code can regularly take longer than the watchdog time limit. I think you could output a "." every second or so to show the processor is running and the picomite will send a "^C" and cpu restart if it gets no serial activity for 10s. You could use the software watchdog on the webmite, but the serial activity means the picomite can also display an online indication.