Setting Below-Sea-Level Altitude Compensation on Sensirion SCD40
@June 26, 2024
Bitcreed is proud to support open source users and projects through Github.
Here’s a recent contribution by Andreas to a user who asks if he can altitude-compensate the Sensirion SCD40 sensor to below sea level as the native altitude compensation function setSensorAltitude()
only supports positive values.
As it turns out, the sensor also provides an option to compensate for ambient pressure with setAmbientPressure()
for use with an absolute pressure sensor like the BME280 but with some physics, we can just make use of this interface to set negative altitudes. Just calculate the ambient pressure (in hPa) at the desired altitude and send that to the sensor for compensation.
Read the full solution in the Github issue: https://github.com/Sensirion/arduino-i2c-scd4x/issues/35
This is our passion so don’t hesitate to contact us for expertise with embedded projects, device drivers, software prototypes etc.