Hi, if you facing the same problem as me :
BME280 test Could not find a valid BME280 sensor, check wiring!
I found a solution for this problem.
- First, check your BME280 address by this sketch
- if your address is 0x77 you do not have to change anything
- if your address is different change your library
- open library file Adafruit_BME280.h – normally is saved at C:\Users\USERinfo\Documents\Arduino\libraries\Adafruit_BME280_Library-master
- find #define BME280_ADDRESS (0x76) and change to your scanned address
- 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
- find
if (read8(BME280_REGISTER_CHIPID) != 0x60) return false;
- change to
if (read8(BME280_REGISTER_CHIPID) != 0x60) //return false;
EDIT: if you just comment the return false; statement, there should be problem with compilation because the if statement is in one-line statement type(there are missing curly brackets). So you got two options.
1) change the if statement, adds curly brackets so it should look like this :if (read8 (BME280_REGISTER_CHIPID)! = 0x60) {
//return false;}2) just delete the whole if statement with the return value. That if just check if the chip came from adafruit production.
- find
Problem is because adafruit library check CHIPID and your chipid is different than what adafruit sell.