Skip to content

Commit e120688

Browse files
committed
Ignore first reading of HDC320x
1 parent 0210209 commit e120688

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/i2c/drivers/WipperSnapper_I2C_Driver_HDC302X.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ class WipperSnapper_I2C_Driver_HDC302X : public WipperSnapper_I2C_Driver {
5656

5757
// set the HDC302X's data rate to 1 Hz lowest noise
5858
_hdc302x->setAutoMode(EXIT_AUTO_MODE);
59-
59+
// discard first reading (It returned -45c for me once)
60+
_hdc302x->readTemperatureHumidityOnDemand(_temp, _humidity,
61+
TRIGGERMODE_LP0);
6062
return true;
6163
}
6264

0 commit comments

Comments
 (0)