Arduino BME280 – Could not find a valid BME280 sensor – SOLVED


Hi, if you facing the same problem as me :

 

I found a solution for this problem.

  1. First, check your BME280 address by this sketch 
    1. if your address is 0x77 you do not have to change anything
    2. if your address is different change your library
      1. open library file Adafruit_BME280.h – normally is saved at C:\Users\USERinfo\Documents\Arduino\libraries\Adafruit_BME280_Library-master
      2. find  #define BME280_ADDRESS (0x76) and change to your scanned address
  2. If you still have the same problem open file Adafruit_BME280.cpp – normally is saved at C:\Users\info\Documents\Arduino\libraries\Adafruit_BME280_Library-master
    1. find
    2. change to

       

Problem is because adafruit library check CHIPID and your chipid is different than what adafruit sell.


10 thoughts on “Arduino BME280 – Could not find a valid BME280 sensor – SOLVED”

  1. Hi
    First I thank you for solving my problem about BME280. Unfortunately I have another problem related to bme280. It doesn’t show the humidity and always shows zero for Humidity. temp and pressure work well but this problem stops my project. I have searched a lot but didn’t find any answer. I wish you could help me.

    Regards.
    Mahdi.S.K

  2. Kerry Rock

    Spectacular! I just spent three days trying to sort this out and am so grateful for your solution. This one needs wider circulation because there are several other BME280’s out there that could use it.

  3. For me was BME280_ADDRESS the problem, here is Adafruit_BME280_Library patch:
    diff –git a/Adafruit_BME280.h b/Adafruit_BME280.h
    index 5721a9a..5ea0157 100644
    — a/Adafruit_BME280.h
    +++ b/Adafruit_BME280.h
    @@ -215,7 +215,8 @@ public:
    Adafruit_BME280(int8_t cspin, SPIClass *theSPI = &SPI);
    Adafruit_BME280(int8_t cspin, int8_t mosipin, int8_t misopin, int8_t sckpin);
    ~Adafruit_BME280(void);
    – bool begin(uint8_t addr = BME280_ADDRESS, TwoWire *theWire = &Wire);
    +// bool begin(uint8_t addr = BME280_ADDRESS, TwoWire *theWire = &Wire);
    + bool begin(uint8_t addr = BME280_ADDRESS_ALTERNATE, TwoWire *theWire = &Wire);
    bool init();

    void setSampling(sensor_mode mode = MODE_NORMAL,

  4. Thank you so much!

    I got this sensor (BMP, not BME, but apparently the libraries are similar enough and I guess the protocol (I2C) is the same.

    https://www.banggood.com/CJMCU-280E-BME280-High-Precision-Atmospheric-Pressure-Sensor-Module-Board-p-1103115.html?akmClientCountry=BE&p=X0110142748584201912&custlinkid=723808&cur_warehouse=CN
    and it wouldn’t work if I didn’t change the address to 0x76 in the Adafruit_BMP280.h AND also comment the line you showed. I also changed in the Adafruit_BMEP80.cpp

    bool Adafruit_BMP280::begin(uint8_t addr, uint8_t chipid) {
    _i2caddr = addr;
    to
    bool Adafruit_BMP280::begin(uint8_t addr, uint8_t chipid) {
    _i2caddr = 0x77;

    There are plenty of discussions online regarding the address change, but none with this tweak which for me was crucial.
    Also, sanity check for beginners like me, make sure the pins are soldered to the sensor (and not just fit through the holes)! 0:)

    Thank you once again!

  5. thank you thank you soooo much.. 2 days waisted search why the sensor is not working..

    god bless you kind man

Leave a Comment

Your email address will not be published. Required fields are marked *