Skip to content

Fixed sensor initialization and automatic selection of I2C addresses for BME/BMP sensors#2452

Open
IoTThinks wants to merge 1 commit intomeshcore-dev:devfrom
IoTThinks:MCdev-Fixed-Sensor-Initialization-and-AutoI2C-202604
Open

Fixed sensor initialization and automatic selection of I2C addresses for BME/BMP sensors#2452
IoTThinks wants to merge 1 commit intomeshcore-dev:devfrom
IoTThinks:MCdev-Fixed-Sensor-Initialization-and-AutoI2C-202604

Conversation

@IoTThinks
Copy link
Copy Markdown
Contributor

@IoTThinks IoTThinks commented Apr 30, 2026

Fixed sensor initialization and automatic selection of I2C addresses 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.
    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.
  • Added automatically selection of I2C addresses 0x76 and 0x77 for BME280, BMP280 and BME680.
    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.
image

…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.
@IoTThinks
Copy link
Copy Markdown
Contributor Author

Without this PR, we need to solder most of the BME/BMP sensors to fit the 0x76 address for MeshCore.
And not all boards have the same default I2C addresses.
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant