copterust / bmp280

embedded-hal compatible driver for bmp280 pressure sensor
7 stars 12 forks source link

Pressure is always 1048576.0 #4

Closed jwillikers closed 1 year ago

jwillikers commented 3 years ago

Any idea why I would be getting 1048576.0 as the value for pressure every time? I reset the config to forced each time like in the example in the proving ground repository. I'm using the latest commit from master.

little-arhat commented 3 years ago

Hello! Could you please try smth like this https://github.com/copterust/proving-ground/blob/master/bmp280/main.rs?

Also, what does temp senso read?

jwillikers commented 3 years ago

You know what, I think the problem is the I2C address. I was able to get readings using the bmp280-rs library by using 0x77 as the address instead of 0x76, which I notice is hard-coded here.

bofh commented 3 years ago

Documentation mentions SDO pin that selects 0x77 or 0x76 address, even on the fly.

jwillikers commented 3 years ago

I should probably give that a try. I got the Adafruit dev-board for the BMP280 to avoid soldering, since why solder if I can avoid it. I bet I can probe the SDO pinout with a pogo pin or something and see if that works. Thanks for the tip.

jwillikers commented 3 years ago

I went ahead and tested against my fork where I just changed 0x76 to 0x77 and that gets me actual pressure values printing, no fixed value. It'd be nice to be able to set the I2C address in software. I'd be willing to submit a PR if you'd like.

little-arhat commented 1 year ago

closed by #5

jlpettersson commented 1 year ago

I get the same problem. And temperature is always 0.0.

I have tried with both address 0x76 and 0x77.