I have the Environmental Breakout Combo board. Using the qwiic connection on the Esp32 Thing Plus. Using the example code it looks like everything is working. Although the readings are quite a bit off. I am in Sarasota, FL and the altitude here is about 20 ft. give or take. The reading from the BME280 is at -196 ft. How is that being calculated and how would you go about calibrating that to be more realistic?
Hi Tim,
The altitude reading on the BME280 is calculated using the pressure readings in our library so it should “automatically” calibrate to give the proper reading. That said, most likely the value we use in that formula might be off from the true pressure at your test location. I would recommend using the setReferencePressure() function like [this issue covers. There is also [an example you can use to set that value to match the actual pressure values. You can use that example to incorporate into your code to adjust the sensor and that should fix your altitude discrepancy.
If you continue to have issues or have another question about the Environmental Combo Board, please reply to this thread and I would be happy to help as much as I can.](SparkFun_BME280_Arduino_Library/examples/Example8_LocalPressure/Example8_LocalPressure.ino at master · sparkfun/SparkFun_BME280_Arduino_Library · GitHub)](Reference pressure can't be set · Issue #1 · sparkfun/SparkFun_BME280_Arduino_Library · GitHub)
Hello, and thanks for using the new SparkFun forums!
What you’re seeing is the effect of weather on barometric pressure. As the weather changes barometric pressure also changes and that affects your altitude reading. To correct for this, you’d need to modify your code to accept a correction factor and then when you wanted to get an accurate altitude reading, find the current barometric pressure and apply the correction factor to get your true altitude.
I’m probably not explaining this very well. If you know a pilot, they can probably explain this better than I can as aircraft have to compensate for weather to get the altimeter in their planes to read the correct field altitude when taking off and landing.
Thanks Chris! I appreciate your response and it does make sense. I figured there some math that needs to be done, I just have no idea what but sounds like you have pointed me in the right direction anyhow. I will do a little more digging into it and see if there is some sort of formula I can apply.
Thanks again!
TS-Mark:
Hi Tim,The altitude reading on the BME280 is calculated using the pressure readings in our library so it should “automatically” calibrate to give the proper reading. That said, most likely the value we use in that formula might be off from the true pressure at your test location. I would recommend using the setReferencePressure() function like [this issue covers. There is also [an example you can use to set that value to match the actual pressure values. You can use that example to incorporate into your code to adjust the sensor and that should fix your altitude discrepancy.
If you continue to have issues or have another question about the Environmental Combo Board, please reply to this thread and I would be happy to help as much as I can.
[/quote]HI Mark! Thanks for your response! I saw it right after Chris’s. I will dig into your suggestions and see where that gets me. I’ll reply back with where I end up.
Thanks much!! :)](SparkFun_BME280_Arduino_Library/examples/Example8_LocalPressure/Example8_LocalPressure.ino at master · sparkfun/SparkFun_BME280_Arduino_Library · GitHub)](Reference pressure can't be set · Issue #1 · sparkfun/SparkFun_BME280_Arduino_Library · GitHub)