1818#define WipperSnapper_I2C_Driver_SCD4X_H
1919
2020#include " WipperSnapper_I2C_Driver.h"
21- #include < SensirionI2CScd4x .h>
21+ #include < SensirionI2cScd4x .h>
2222#include < Wire.h>
2323
2424/* *************************************************************************/
@@ -51,8 +51,8 @@ class WipperSnapper_I2C_Driver_SCD4X : public WipperSnapper_I2C_Driver {
5151 */
5252 /* ******************************************************************************/
5353 bool begin () {
54- _scd = new SensirionI2CScd4x ();
55- _scd->begin (*_i2c);
54+ _scd = new SensirionI2cScd4x ();
55+ _scd->begin (*_i2c, _sensorAddress );
5656
5757 // stop previously started measurement
5858 if (_scd->stopPeriodicMeasurement ())
@@ -78,7 +78,7 @@ class WipperSnapper_I2C_Driver_SCD4X : public WipperSnapper_I2C_Driver {
7878 delay (100 );
7979
8080 // Check if data is ready
81- error = _scd->getDataReadyFlag (isDataReady);
81+ error = _scd->getDataReadyStatus (isDataReady);
8282 if (error || !isDataReady)
8383 return false ;
8484
@@ -145,10 +145,10 @@ class WipperSnapper_I2C_Driver_SCD4X : public WipperSnapper_I2C_Driver {
145145 }
146146
147147protected:
148- SensirionI2CScd4x *_scd; // /< SCD4x driver object
148+ SensirionI2cScd4x *_scd; // /< SCD4x driver object
149149 uint16_t _co2; // /< SCD4x co2 reading
150150 float _temperature; // /< SCD4x temperature reading
151151 float _humidity; // /< SCD4x humidity reading
152152};
153153
154- #endif // WipperSnapper_I2C_Driver_SCD4X
154+ #endif // WipperSnapper_I2C_Driver_SCD4X
0 commit comments