mirror of
https://github.com/thelsing/knx.git
synced 2025-01-02 00:06:43 +01:00
update to newest bsec lib
This commit is contained in:
parent
9708a54e71
commit
8ed0181d36
@ -74,14 +74,15 @@ void setup(void)
|
|||||||
iaqSensor.setConfig(bsec_config_iaq);
|
iaqSensor.setConfig(bsec_config_iaq);
|
||||||
checkIaqSensorStatus();
|
checkIaqSensorStatus();
|
||||||
|
|
||||||
bsec_virtual_sensor_t sensorList[7] = {
|
bsec_virtual_sensor_t sensorList[] = {
|
||||||
BSEC_OUTPUT_RAW_TEMPERATURE,
|
BSEC_OUTPUT_RAW_TEMPERATURE,
|
||||||
BSEC_OUTPUT_RAW_PRESSURE,
|
BSEC_OUTPUT_RAW_PRESSURE,
|
||||||
BSEC_OUTPUT_RAW_HUMIDITY,
|
BSEC_OUTPUT_RAW_HUMIDITY,
|
||||||
BSEC_OUTPUT_RAW_GAS,
|
BSEC_OUTPUT_RAW_GAS,
|
||||||
BSEC_OUTPUT_IAQ_ESTIMATE,
|
BSEC_OUTPUT_IAQ,
|
||||||
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE,
|
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_TEMPERATURE,
|
||||||
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY,
|
BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY,
|
||||||
|
BSEC_OUTPUT_CO2_EQUIVALENT
|
||||||
};
|
};
|
||||||
|
|
||||||
knx.setSaveCallback(saveBme680State);
|
knx.setSaveCallback(saveBme680State);
|
||||||
@ -99,7 +100,7 @@ void setup(void)
|
|||||||
|
|
||||||
iaqSensor.updateSubscription(sensorList, 7, BSEC_SAMPLE_RATE_LP);
|
iaqSensor.updateSubscription(sensorList, 7, BSEC_SAMPLE_RATE_LP);
|
||||||
checkIaqSensorStatus();
|
checkIaqSensorStatus();
|
||||||
String output = "Timestamp [ms], raw temperature [°C], pressure [hPa], raw relative humidity [%], gas [Ohm], IAQ, IAQ accuracy, temperature [°C], relative humidity [%]";
|
String output = "Timestamp [ms], raw temperature [°C], pressure [hPa], raw relative humidity [%], gas [Ohm], IAQ, IAQ accuracy, temperature [°C], relative humidity [%], CO2";
|
||||||
Serial.println(output);
|
Serial.println(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,6 +125,8 @@ void loop(void)
|
|||||||
output += ", " + String(iaqSensor.iaqAccuracy);
|
output += ", " + String(iaqSensor.iaqAccuracy);
|
||||||
output += ", " + String(iaqSensor.temperature);
|
output += ", " + String(iaqSensor.temperature);
|
||||||
output += ", " + String(iaqSensor.humidity);
|
output += ", " + String(iaqSensor.humidity);
|
||||||
|
output += ", " + String(iaqSensor.co2Equivalent);
|
||||||
|
output += ", " + String(iaqSensor.co2Accuracy);
|
||||||
Serial.println(output);
|
Serial.println(output);
|
||||||
updateState();
|
updateState();
|
||||||
|
|
||||||
@ -140,6 +143,7 @@ void loop(void)
|
|||||||
goIaqAccurace.objectWrite(iaqSensor.iaqAccuracy);
|
goIaqAccurace.objectWrite(iaqSensor.iaqAccuracy);
|
||||||
goTemperature.objectWrite(iaqSensor.temperature);
|
goTemperature.objectWrite(iaqSensor.temperature);
|
||||||
goHumidity.objectWrite(iaqSensor.humidity);
|
goHumidity.objectWrite(iaqSensor.humidity);
|
||||||
|
goCo2Ppm.objectWrite(iaqSensor.co2Equivalent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -249,8 +253,8 @@ void triggerCallback(GroupObject& go)
|
|||||||
possible time slot
|
possible time slot
|
||||||
*/
|
*/
|
||||||
Serial.println("Triggering ULP plus.");
|
Serial.println("Triggering ULP plus.");
|
||||||
bsec_virtual_sensor_t sensorList[1] = {
|
bsec_virtual_sensor_t sensorList[] = {
|
||||||
BSEC_OUTPUT_IAQ_ESTIMATE,
|
BSEC_OUTPUT_IAQ, BSEC_OUTPUT_CO2_EQUIVALENT
|
||||||
};
|
};
|
||||||
|
|
||||||
iaqSensor.updateSubscription(sensorList, 1, BSEC_SAMPLE_RATE_ULP_MEASUREMENT_ON_DEMAND);
|
iaqSensor.updateSubscription(sensorList, 1, BSEC_SAMPLE_RATE_ULP_MEASUREMENT_ON_DEMAND);
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
<AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>
|
||||||
<string>..</string>
|
<string>..</string>
|
||||||
<string>..\..</string>
|
<string>..\..</string>
|
||||||
|
<string>..\..\..\Documents\Arduino\libraries</string>
|
||||||
</AdditionalLibraryDirectories>
|
</AdditionalLibraryDirectories>
|
||||||
<OutputSubdirectory>Output\$(PlatformName.defuse)\$(ConfigurationName.defuse)</OutputSubdirectory>
|
<OutputSubdirectory>Output\$(PlatformName.defuse)\$(ConfigurationName.defuse)</OutputSubdirectory>
|
||||||
<EnableVerboseBuild>false</EnableVerboseBuild>
|
<EnableVerboseBuild>false</EnableVerboseBuild>
|
||||||
|
Loading…
Reference in New Issue
Block a user