Skip to content

Commit 78a02ac

Browse files
committed
✨ Since the accuracy of the TMP102 is higher than the BME280 we'll give the TMP102 a bit more weight
1 parent 189341f commit 78a02ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

esp8266.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ void handleRoot()
7373
}
7474

7575
void readTemperature() {
76-
return (bme280.readTemperature() + tmp102.readTempC()) / 2;
76+
float bme280Temperature = bme280.readTemperature();
77+
float tmp102Temperature = tmp102.readTempC();
78+
79+
return (tmp102Temperature + tmp102Temperature + bme280Temperature) / 3;
7780
}
7881

7982
void setupWiFi()

0 commit comments

Comments
 (0)