18
18
#define WipperSnapper_I2C_Driver_SCD4X_H
19
19
20
20
#include " WipperSnapper_I2C_Driver.h"
21
- #include < SensirionI2CScd4x .h>
21
+ #include < SensirionI2cScd4x .h>
22
22
#include < Wire.h>
23
23
24
24
/* *************************************************************************/
@@ -51,8 +51,8 @@ class WipperSnapper_I2C_Driver_SCD4X : public WipperSnapper_I2C_Driver {
51
51
*/
52
52
/* ******************************************************************************/
53
53
bool begin () {
54
- _scd = new SensirionI2CScd4x ();
55
- _scd->begin (*_i2c);
54
+ _scd = new SensirionI2cScd4x ();
55
+ _scd->begin (*_i2c, _sensorAddress );
56
56
57
57
// stop previously started measurement
58
58
if (_scd->stopPeriodicMeasurement ())
@@ -78,7 +78,7 @@ class WipperSnapper_I2C_Driver_SCD4X : public WipperSnapper_I2C_Driver {
78
78
delay (100 );
79
79
80
80
// Check if data is ready
81
- error = _scd->getDataReadyFlag (isDataReady);
81
+ error = _scd->getDataReadyStatus (isDataReady);
82
82
if (error || !isDataReady)
83
83
return false ;
84
84
@@ -145,10 +145,10 @@ class WipperSnapper_I2C_Driver_SCD4X : public WipperSnapper_I2C_Driver {
145
145
}
146
146
147
147
protected:
148
- SensirionI2CScd4x *_scd; // /< SCD4x driver object
148
+ SensirionI2cScd4x *_scd; // /< SCD4x driver object
149
149
uint16_t _co2; // /< SCD4x co2 reading
150
150
float _temperature; // /< SCD4x temperature reading
151
151
float _humidity; // /< SCD4x humidity reading
152
152
};
153
153
154
- #endif // WipperSnapper_I2C_Driver_SCD4X
154
+ #endif // WipperSnapper_I2C_Driver_SCD4X
0 commit comments