I am using the BME280 to get temp, pressure and humidity in demand mode 1/sec. I have over sampling for each parameter set to 1. Temp and humidity work. The pressure should be around 1020 but comes back around 630. Sometimes I get the correct value but most of the time it is stuck in the 630s. Any idea what I am doing wrong? I am using the 64 bit compensation functions from the data sheet.
Solved! Go to Solution.
Could please confirm whether you are using our recommend sensor API (available here) to communicate with the BME280, and if so, could you share a short snippet of the sensor's configuration and data readout?
Could you also confirm that by 'demand mode' you mean really mean 'forced mode' of the sensor? If so, are you waiting for a sufficient period between the measurement is triggered and the data readout? If not, are you reading data in a single burst-read transaction?
I am using forced once every 5 minuetes.
I am using the code as presented in the BME280 datasheet. See attached source file
#define CTRL_HUM_VAL 0x01 // 1x samples of humidity
#define CTRL_MEAS_VAL 0b00100101 // 1x samples of temp and pressure in force mode
#define CONFIG_VAL 0x00 // no filter and forced trigger
The read is a one block read of 8 bytes at address 0xF7
#define DATA_BLK_ADR 0xF7
#define DATA_BLK_LEN 8
I have attached the code and a 14hr run where you can see the pressure going in and out of the correct value.