adafruit / Adafruit_BMP280_Library

Arduino Library for BMP280 sensors
253 stars 186 forks source link

Enabling "takeForcedMeasurement()"? #27

Closed Jilocasin closed 2 years ago

Jilocasin commented 5 years ago

Right now when setting the BMP280 in FORCED mode at startup once, I experience reading out the same value for temperature and pressure over and over. This is probably due to the sensor not updating the readout values periodically (like in NORMAL mode), but rather waiting for a trigger to do so.

Compared to the BME280 library the "takeForcedMeasurement" method is still commened out with a "todo" annortation. As the same method in the BME280 library exists and has the exact same content, I wanted to ask if the method could be safely enabled in this library as well to allow using the FORCED mode with the BMP sensor at all.

tcpipchip commented 4 years ago

i am having the same problem :(

Jilocasin commented 4 years ago

After enabling the commented part in the BMP library, I was able to force single measurements, just like the BME library is capable of. You can give that a try.

tcpipchip commented 4 years ago

Now it´s working very fine!

ladyada commented 4 years ago

hiya can you tell us exactly what line?

Jilocasin commented 4 years ago

I was talking about the following: https://github.com/adafruit/Adafruit_BMP280_Library/blob/master/Adafruit_BMP280.h#L166 https://github.com/adafruit/Adafruit_BMP280_Library/blob/master/Adafruit_BMP280.cpp#L399

Sorry if this isn't the appropriate way to "cite" content in a repo. Still new to github

ladyada commented 4 years ago

oh yeah it isnt tested, so no guarantee it works!

R3Spected commented 4 years ago

Had to add BMP280_REGISTER_STATUS = 0xF3, aswell.

tcpipchip commented 4 years ago

nice

WX-PLU commented 4 years ago

My temp and pressures reads zero. R3Spected, what file and line did you add that?

tcpipchip commented 4 years ago

https://zephy-platformio.blogspot.com/2020/03/nina-b112-zephyr-platformio.html?m=1

denisandroid commented 4 years ago

I confirm, takeForcedMeasurement () works on BMP280 via I2C(esp8266).

But sometimes, rarely, once there was a value of 0 at startup, but it is not accurate because of this or not.

caternuson commented 2 years ago

Closing. Should be fixed with #63.