Skip to content

Commit 6aa9a66

Browse files
committed
first complete commit
1 parent 18f1986 commit 6aa9a66

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

SCD30.h

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,38 @@
66
#include <Wire.h>
77

88
// the i2c address
9-
#define SCD30_I2CADDR_DEFAULT 0x61 ///< SGP30 has only one I2C address
9+
#define SCD30_I2CADDR_DEFAULT 0x61 ///< SCD30 has only one I2C address
1010

1111
// commands and constants
12-
#define SCD30_CRC8_POLYNOMIAL 0x31 ///< Seed for SGP30's CRC polynomial
12+
#define SCD30_CRC8_POLYNOMIAL 0x31 ///< Seed for Scd30's CRC polynomial
1313
#define SCD30_CRC8_INIT 0xFF ///< Init value for CRC
1414
#define SCD30_WORD_LEN 2 ///< 2 bytes per word
1515

16-
/**************************************************************************/
17-
/*! Class that stores state and functions for interacting with SGP30 Gas Sensor */
18-
/**************************************************************************/
16+
/**
17+
*
18+
*
19+
*
20+
*
21+
*
22+
*
23+
* */
1924
class SCD30 {
2025
public:
2126
SCD30();
2227
boolean begin(TwoWire *theWire = NULL);
2328
float fTemp, fRH, fCO2;
2429
boolean bReady;
2530

26-
boolean trigSingleMeasurement(uint16_t ambientPressure);
27-
boolean trigContinuousMeasurement(uint16_t ambientPressure);
31+
boolean trigSingleMeasurement(uint16_t ambientPressure = 0);
32+
boolean trigContinuousMeasurement(uint16_t ambientPressure = 0);
2833
boolean stopContinuousMeasurement();
29-
boolean setMeasurementInterval(uint16_t uInterval);
34+
boolean setMeasurementInterval(uint16_t uInterval = 2);
3035
boolean getDataReadyStatus();
3136
boolean readMeasurement();
3237
boolean setTemperatureOffset(uint16_t tempOffset);
3338
boolean setAltitudeOffset(uint16_t altitude);
3439

35-
boolean setASC(boolean enable);
40+
boolean setASC(boolean enable = true);
3641
boolean setFRCValue(uint16_t co2baseline);
3742

3843
private:

0 commit comments

Comments
 (0)