Is this possible? I've been trying to make an ESP32 be able to connect to one WiFI network if the other one isn't in range. e.g. home, and work. Is this currently possible with the ArduinoIoTPreferredConnection? I thought I could use something like ArduinoCloud.begin(wifiMulti.run()); but that doesn't seem to compile correctly. If it is possible to do this, would I need to change the ArduinoIoTCloud.h or ArduinoIoTCloud.cpp file to allow multiple WiFI networks and be able to connect to the one that is the closest?
I was thinking along these lines of pseudocode:
if (network "home" is available) {connect to home} else if (network "work" is available) {connect to work} else {scan for networks every 5 seconds until one of the correct networks is found}