7 years, 3 months ago.

BMP280 + nucleo - to low (50-60 hPa) pressure readings

Hi!

Ive got a little problem with Nucleo F446RE board and BMP280 sensor. Temperature readings looks OK (veryfied by DS1820), however pressure reading are a little bit strange. Typically obtained values are around 955 hPa and sholud be around 1000-1010 hPa. My altitude above sea is 110m and temperature 25 Celcius so even the compansation wouldn't give me the right value. I'm using this library: https://mbed.org/users/Calcium/code/BME280/

#include "mbed.h"
#include "TextLCD.h"
#include "BMP280.h"

TextLCD lcd(D8, D9, D4, D5, D6, D7); // rs, e, d4, d5, d6, d7
BMP280 bmp280(D14,D15,0xEE);
  
int main() 
{
      float temperature_bmp280;
      float pressure_bmp280;

    bmp280.initialize();
    wait(0.2);   
        
     while(1)
     {
     
        lcd.cls();
      
        temperature_bmp280=bmp280.getTemperature();         
        pressure_bmp280=bmp280.getPressure();     
                      
        lcd.printf("%f\n%f\n", temperature_bmp280, pressure_bmp280);
        wait(2.5);
               
       } //end of while
} //end of main

I've no idea why it's now working properly :(

Be the first to answer this question.