Photon flashing blue after a few minutes

I have been following a blnyk tutorial using the adafruit htd210 however after a few minutes my photon flashes blue then my only way out is to set the WiFi credentials again.

here is the code i have…any advice would be great

Thanks…Ben

// This #include statement was automatically added by the Particle IDE.
#include "blynk/blynk.h"

// This #include statement was automatically added by the Particle IDE.
#include "HTU21D/HTU21D.h"

// This #include statement was automatically added by the Particle IDE.
//#include "HTU21D/HTU21D.h"

HTU21D htu = HTU21D();

double tempVal, tempFVal, humidVal;
char auth[] = "*****************************";

void setup() {
    //Serial.begin(9600);
    Blynk.begin(auth);
    
    if (!htu.begin()){
        Serial.println("Couldn't find sensor!");
        while(1) Particle.process();
    }
	
}

BLYNK_READ(V0){
    Blynk.virtualWrite(V0, round(tempVal*100)/100);
}
BLYNK_READ(V1){
    Blynk.virtualWrite(V1, round(tempFVal*100)/100);
}
 BLYNK_READ(V2){       
    Blynk.virtualWrite(V2, humidVal);
 }  

void loop() {
    Blynk.run();
    //Serial.print("Temp: "); Serial.print(htu.readTemperature()); Serial.print(" C"); Serial.print("\t"); Serial.print(tempFVal); Serial.print(" F");        
    //Serial.print("\t\tHUM: "); Serial.print(htu.readHumidity()); Serial.println(" %");      
    //Serial.println("");                                                                     
   delay(10000);
    tempVal = htu.readTemperature();
    tempFVal = ((9.0/5.0)*tempVal + 32);
    humidVal = htu.readHumidity();
}

You should not have a delay(10000) block Blynk.run() that long.
Rather go with a non-blocking approach

uint32_t msSoftDelay;
void loop() {
    Blynk.run();

    if (millis() - msSoftDelay >= 10000)
    {
        msSoftDelay = millis();
        tempVal = htu.readTemperature();
        tempFVal = ((9.0/5.0)*tempVal + 32);
        humidVal = htu.readHumidity();
    }
}

BTW, have you tried Safe Mode when you got into these troubles?

yes i tried safe mode however this did not work

the 10 second timer was not in there until after the fault was occurring as i thought i may have been sending the max data allowed