Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normal mode not working #137

Open
marekburiak opened this issue Sep 20, 2023 · 0 comments
Open

Normal mode not working #137

marekburiak opened this issue Sep 20, 2023 · 0 comments

Comments

@marekburiak
Copy link

When I switch from the default Forced mode to Normal mode the readings remain the same.

If I have it like this:

BME280I2C myBme;
BME280I2C::Settings mySettings;
float myTemperature;
float myHumidity;
float myPressure;

in setup():
mySettings.tempOSR = BME280I2C::OSR_X16;
mySettings.humOSR = BME280I2C::OSR_X16;
mySettings.presOSR = BME280I2C::OSR_X16;
mySettings.mode = BME280I2C::Mode_Forced;
mySettings.standbyTime = BME280I2C::StandbyTime_50ms;
mySettings.filter = BME280I2C::Filter_16;
mySettings.spiEnable = BME280I2C::SpiEnable_False;
mySettings.bme280Addr = BME280I2C::I2CAddr_0x76;

myBme.setSettings(mySettings);

in loop():
myBme.read(myPressure, myTemperature, myHumidity);

then it works fine but if I change the mode to

mySettings.mode = BME280I2C::Mode_Normal;

then it just gets the values once and any subsequent calls to read just return the same values.
using #define DEBUG_ON shows the same values being read, like Data: 4F 91 0 83 E1 0 83 E5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant