File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,25 @@ bool SCD30::setAmbientPressure(uint16_t pressure_mbar)
153
153
return sendCommand (COMMAND_CONTINUOUS_MEASUREMENT, pressure_mbar);
154
154
}
155
155
156
+ // SCD30 soft reset
157
+ void SCD30::reset ()
158
+ {
159
+ sendCommand (COMMAND_RESET);
160
+
161
+ }
162
+
163
+ // Get the current ASC setting
164
+ bool SCD30::getAutoSelfCalibration ()
165
+ {
166
+ uint16_t response = readRegister (COMMAND_AUTOMATIC_SELF_CALIBRATION);
167
+ if (response == 1 ) {
168
+ return true ;
169
+ }
170
+ else {
171
+ return false ;
172
+ }
173
+ }
174
+
156
175
// Begins continuous measurements
157
176
// Continuous measurement status is saved in non-volatile memory. When the sensor
158
177
// is powered down while continuous measurement mode is active SCD30 will measure
Original file line number Diff line number Diff line change 44
44
#define COMMAND_SET_FORCED_RECALIBRATION_FACTOR 0x5204
45
45
#define COMMAND_SET_TEMPERATURE_OFFSET 0x5403
46
46
#define COMMAND_SET_ALTITUDE_COMPENSATION 0x5102
47
+ #define COMMAND_RESET 0xD304
47
48
48
49
class SCD30
49
50
{
@@ -67,9 +68,12 @@ class SCD30
67
68
bool setAutoSelfCalibration (bool enable);
68
69
bool setForcedRecalibrationFactor (uint16_t concentration);
69
70
bool setTemperatureOffset (float tempOffset);
71
+ bool getAutoSelfCalibration (void );
70
72
71
73
bool dataAvailable ();
72
74
bool readMeasurement ();
75
+
76
+ void reset ();
73
77
74
78
bool sendCommand (uint16_t command, uint16_t arguments);
75
79
bool sendCommand (uint16_t command);
You can’t perform that action at this time.
0 commit comments