Hi there,
I have a couple of queries regarding the output of the BME280.
Previously I used the BMP180 and there was a function in the library that allowed you to get relative pressure by supplying the altitude of your location and it did the compensation for you, snippet from the BMP180 example below. ALTITUDE is defined at the beginning of the code.
#define ALTITUDE (90)
// The pressure sensor returns abolute pressure, which varies with altitude.
// To remove the effects of altitude, use the sealevel function and your current altitude.
// This number is commonly used in weather reports.
// Parameters: P = absolute pressure in mb, ALTITUDE = current altitude in m.
// Result: p0 = sea-level compensated pressure in mb
p0 = pressure.sealevel(P,ALTITUDE); // we're at 1655 meters (Boulder, CO)
Serial.print("relative (sea-level) pressure: ");
Serial.print(p0,2);
Serial.print(" mb, ");
With the BME280, the code for reading the pressure is a lot simpler but in the example code there was nothing about getting relative pressure or a sealevel function? Have I missed something or do I just need to do the small bit of maths myself? relative pressure = absolute pressure + h / 8.3 where h is height in metres.