Workaround for endlessly blinking cyan and flakey cloud connnection

@sparkly , I have had the same issue and opted to keep automatic mode and use the following code. I test it by firing up my microwave which seems to force the photons off the cloud. My spark core on the other hand is much more robust and seems to never get pushed off.

#include "application.h"
const uint32_t SOFTDELAY10s   = 10000UL;
uint32_t lastTime;
volatile int lostconnectionTimeUnix = 0;

void setup(){
//Your normal setup code here
}//setup
    
void loop() {
    if (!Spark.connected()) {  //record when photon lost connection
        if(Time.now() > (lostconnectionTimeUnix + 6000)) { //try reconnect if disconnected > 6 secs
           Spark.connect();  
           while(!Spark.connected()) {
            Spark.process();
            }//while(!Spark.connected())
            if(lostconnectionTimeUnix == 0) {lostconnectionTimeUnix = Time.now();}
            lastTime = millis();
            while(millis() - lastTime < SOFTDELAY10s) {Spark.process();}
            }//if(Time.now() > (firstlostconnectionTimeUnix + 6000))
    }//if (!Spark.connected())
    if (Spark.connected()){

//Your normal loop code here

        lostconnectionTimeUnix = 0;
    }//if (Spark.connected())       
}//loop