I'd like to make it so my Arduino Nano RP2040 Connect resets itself and reconnects when it is disconnected from the internet. as is, it will randomly disconnect or stop working every once in a while and i will have to manually go over and reset it. This is what i tried to use to get it to reset, but i get the 4X long, 4X short blink pattern, which means the Mbed OS crashed. (it works when i remove this code)
before Setup() i have:
void(* resetFunc) (void) = 0;
Then at the end of loop(), I have
if(!ArduinoCloud.connected()){
resetFunc();
}
Maybe there's a more elegant way to do this, that actually works. is there a way to actually test when the Arduino cloud gets disconnected? I would prefer a total reset of the Arduino if it gets disconnected or stops transmitting data. Is this Possible?