Fixed sensor initialization and automatic selection of I2C addresses for BME/BMP sensors#2452
Conversation
…for BME/BMP sensors - Added i2c_probe to probe sensors before initializing to avoid setup unnecessary sensors and to avoid bugs from unused sensors to impact the main code - Added automatically selection of I2C addresses 0x76 and 0x77 for BME280, BMP280 and BME680.
446564
left a comment
There was a problem hiding this comment.
🙌 tested on xiao nrf with bme/bmp280, no 680 on hand.
nice work
|
Great. |
|
there is new sensor detection PR that should be much more robust.. I'm bit conflicted which PR to merge first, because sensor init was not the best for long time. mentioned PR: #2327 |
|
I like them both actually. With this one I like the change to have multiple addresses for a given sensor as there are many with such possibilities. I like #2327 because it scans all addresses. I wish we moved away from build flags now that we are scanning, I know if saves a bit of space in fw but it would be nice for the end user to just add a sensor and have it work. |
|
This is about reliability vs. major feature changes. This PR is a maintenance patch while PR #2327 is a new feature patch. If you push PR #2327, please perform extensive testings too. |


Fixed sensor initialization and automatic selection of I2C addresses for BME/BMP sensors
Current issue Heltec V3.2 wire.cpp i2cRead Error #1086.
One time, I saw Adafruit_VL53L0X crashed Heltec boards and this i2c_probe could mitigate / avoid the crash.
This is to avoid the headache to mess around with I2C addresses of BME280, BMP280 and BME680.
If the I2C address is defined, the automatic selection of I2C addresses is ignored.
Tested and works perfect for 3 releases of my MeshCore variant.
