Using the Python library from Pimoroni, the return value from

weather.presssure()

is a value like 84907.18

This is supposed to be in hPa (hectoPascals), but is two orders of magnitude too big to be an hPa value on Earth. I double-checked that I wasn’t somewhere deep in Jupiter’s atmosphere and found I wasn’t, so I dug into the Pimoroni Python ‘envirophat’ library which led me into the bmp280.py library, where I see a bunch of calculations commented as

# formula for pressure from datasheet.

…Except the actual data sheet fairly clearly indicates that the calculated values are in Pascals (Pa) not hPa, so that explains the order of magnitude problem – weather.pressure() is returning a value in Pa, not hPa.

Going further, though, after converting to inHg, the standard unit of measure for barometric pressure in the US, I’m getting values of roughly 25.xx inches – which is quite a bit lower than my weather station’s value (and lower than close-by values from Weather Underground for my location) by about 5 inches (or about 170 hPa). This is far outside the advertised absolute accuracy of +/- 1 hPa.

Curiously, the weather.altitude() function returns 1522m, which is within 2m of the GPS altitude for my location.

Is anybody else using this sensor running into the same issues?

-M.

Yes, I’m getting pressure readings which I’m having trouble explaining. I wrote a script to poll the sensor every 4 hours and left that recording to a spreadsheet for two weeks. Looking at it today, min pressure reading is 81973, and max reading is 82761. Unless I’m messing something up this equates to 819-827 millibar - far lower than anything experienced on Earth?

I’m wondering if I need to calibrate the device or something? But like you the return from weather.altitude() seems reasonable.

Nick

OMG that was funny as hell. I was beginning to wonder myself as mine reads 102K+ so maybe I found a gravitational singularity in Alabama. :) My temp is off by 10+ degrees too and zero is not in a case so heat from the heat-sink should not be an issue.

Hi ,

I used this: print weather.pressure()/100 which prints the correct value in hPa, but the temperature is heating up to 30 degrees celsius for no reason (room temperature is 22°C), and the deviation from magnetic north returns wrong values when turning around as well.