mirror of
https://github.com/anklimov/lighthub
synced 2025-12-09 13:19:50 +03:00
MAC generaton for DUE changed (more enthropy)
http config URI MUST start with /cnf now
This commit is contained in:
@@ -61,31 +61,24 @@ int in_hdc1080::Poll()
|
||||
float h,t;
|
||||
int reg;
|
||||
|
||||
// #ifdef WAK_PIN
|
||||
// digitalWrite(WAK_PIN,LOW);
|
||||
// #endif
|
||||
|
||||
|
||||
Serial.print("T=");
|
||||
Serial.print(t=hdc1080.readTemperature());
|
||||
Serial.print("C, RH=");
|
||||
Serial.print(h=hdc1080.readHumidity());
|
||||
Serial.print("% Status=");
|
||||
publish(t,"/T");
|
||||
publish(h,"/H");
|
||||
Serial.print("HDC Status=");
|
||||
Serial.println(reg=hdc1080.readRegister().rawData,HEX);
|
||||
ccs811.setEnvironmentalData(h,t);
|
||||
|
||||
if (reg==0xff) //ESP I2C glitch
|
||||
if (reg!=0xff)
|
||||
{
|
||||
Serial.print("T=");
|
||||
Serial.print(t=hdc1080.readTemperature());
|
||||
Serial.print("C, RH=");
|
||||
Serial.print(h=hdc1080.readHumidity());
|
||||
Serial.print("%");
|
||||
publish(t,"/T");
|
||||
publish(h,"/H");
|
||||
ccs811.setEnvironmentalData(h,t);
|
||||
}
|
||||
else //ESP I2C glitch
|
||||
{
|
||||
Serial.println("I2C Reset");
|
||||
i2cReset();
|
||||
}
|
||||
|
||||
delay(100);
|
||||
//#ifdef WAK_PIN
|
||||
// digitalWrite(WAK_PIN,HIGH);
|
||||
//#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user