Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

BMP280 usefullness under Circuit Python
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BMP280 usefullness under Circuit Python

by Varmint on Mon Apr 06, 2020 5:41 pm

I have several BMP180 weather sensors running with great results/reliability, but under Circuit Python there doesn't seem to be the proper handlers for seaLevelForAltitude for the BMP280.

The Arduino code I have is:
baroPressure_Hg = bmp.seaLevelForAltitude(elevation, event.pressure, temperature)*0.0295333727;

So, is there an easy way to replicate this functionality for the BMP280 running Circuit Python?

Thanks in advance.

Varmint
 
Posts: 40
Joined: Sat Aug 23, 2014 8:13 pm

Re: BMP280 usefullness under Circuit Python

by siddacious on Mon Apr 06, 2020 6:55 pm

If you look at the documentation here:
https://circuitpython.readthedocs.io/pr ... t/api.html

you'll see that there are 'altitude' and 'sea_level_pressure' attributes that you can use for similar purposes.

siddacious
 
Posts: 271
Joined: Fri Apr 21, 2017 3:09 pm

Re: BMP280 usefullness under Circuit Python

by Varmint on Tue Apr 07, 2020 1:25 pm

Thanks for that, I've got something pretty close to what I need now.

I guess I was expecting to have the same functions available when written by the same vendor.

Strikes me as odd that local baro pressure (corrected for altitude) would be a function in the 085/180 parts libraries, but not the BPM280.

Varmint
 
Posts: 40
Joined: Sat Aug 23, 2014 8:13 pm

Please be positive and constructive with your questions and comments.