We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6c06945 + 124b36d commit fdc9cd3Copy full SHA for fdc9cd3
src/SparkFunBME280.cpp
@@ -113,9 +113,9 @@ uint8_t BME280::begin()
113
}
114
115
//Check communication with IC before anything else
116
- uint8_t chipID = readRegister(BME280_CHIP_ID_REG); //Should return 0x60
117
- if(chipID != 0x58) // This is not BMP
118
- if(chipID != 0x60) // This is not BME
+ uint8_t chipID = readRegister(BME280_CHIP_ID_REG); //Should return 0x60 or 0x58
+ if(chipID != 0x58 && chipID != 0x60) // Is this BMP or BME?
+ return(chipID); //This is not BMP nor BME!
119
120
//Reading all compensation data, range 0x88:A1, 0xE1:E7
121
calibration.dig_T1 = ((uint16_t)((readRegister(BME280_DIG_T1_MSB_REG) << 8) + readRegister(BME280_DIG_T1_LSB_REG)));
0 commit comments