Skip to content

Commit 50ce803

Browse files
committed
Ignore first reading of HDC320x
1 parent 64ed524 commit 50ce803

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/i2c/drivers/WipperSnapper_I2C_Driver_HDC302X.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ 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, TRIGGERMODE_LP0);
6061
return true;
6162
}
6263

0 commit comments

Comments
 (0)