Hi
Any idea of how to calibrate the “Air Quality Sensor v1.3” in the software? Should I set the value to 0 when calibration the sensor in clean air (etc outside) ?
Regards
Tommy
Hi
Any idea of how to calibrate the “Air Quality Sensor v1.3” in the software? Should I set the value to 0 when calibration the sensor in clean air (etc outside) ?
Regards
Tommy
To adjust the thresholds and indicating messages, refer to the decision structure below in the .cpp file.
int AirQualitySensor::slope(void) {
_lastVoltage = _currentVoltage;
_currentVoltage = analogRead(_pin);
_voltageSum += _currentVoltage;
_volSumCount += 1;
updateStandardVoltage();
if (_currentVoltage - _lastVoltage > 400 || _currentVoltage > 700) {
return AirQualitySensor::FORCE_SIGNAL;
}
else if ((_currentVoltage - _lastVoltage > 400 && _currentVoltage < 700)
|| _currentVoltage - _standardVoltage > 150) {
return AirQualitySensor::HIGH_POLLUTION;
}
else if ((_currentVoltage - _lastVoltage > 200 && _currentVoltage < 700)
|| _currentVoltage - _standardVoltage > 50) {
return AirQualitySensor::LOW_POLLUTION;
}
else {
return AirQualitySensor::FRESH_AIR;
}
return -1;
}