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();
}