I’m thinking on a WiFi connection flow. I would like my product (led installation that has an animation running, that shouldn’t stop) to work independent of what the state of the WiFi connection is. Right now I use a timer to run a fixedLoop (outside the main loop().
The idea is that if there are no credentials or that if the wifi dissappeared for a while, I switch to the SoftAP (listen mode). Nonetheless, I want to retry every x seconds to connect (maybe the WiFi network with credentials will show up again). Based on some EEPROM flags I might be able to override some things (for example always chose SoftAP or just turn WiFi Off).
Below a flow I have in mind.
Let’s assume I don’t want only WiFi direct so I go to the connecting to wifi state.
Is it possible to switch to SoftAP mode (with HTTP interface) after a let say 30 seconds (when ready() is still false)? Because in the current example (https://docs.particle.io/reference/firmware/photon/#softap-http-pages) it seems to run in the startup.
Is it possible that while in SoftAP mode, I sometimes reconnect to see if I can find the WiFi? Is that done with
What about this listening() it mentions that is only useful when system code runs as a separate RTOS task from application code. We estimate that firmware feature will be released for the Photon in September 2015. Is this already implemented? (https://docs.particle.io/reference/firmware/photon/#listening-)
Is this flow doable, or is there an easier way to do it?