Skip to content

Conversation

@IoTThinks
Copy link

Added i2c_probe for sensors and fixed BME680 to support Wire1

  • Fixed BME680 to support Wire1
  • Added i2c_probe to check I2C addresses before triggering begin() for sensors. This is to speed up startup process, to avoid unnecessary initiation of unused sensors and to avoid bugs due to sensor codes of unused sensors
  • Added LPS22HB as local library as public Arduino_LPS22HB breaks Wire connection if Wire1 connection is initiated.

In MeshCore > platform.ini, there are two faulty libraries:

  • -D ENV_INCLUDE_LPS22HB=1 ; Crash Wire connection => I added a local LPS22HB to fix this issue.
  • -D ENV_INCLUDE_VL53L0X=1 ; Spam "[Wire.cpp:513] requestFrom(): i2cRead returned Error -1" => i2c_prode will mitigate this as most people do not use VL53L0X

- Fixed BME680 to support Wire1
- Added i2c_probe to check I2C addresses before triggering begin() for sensors. This is to speed up startup process, to avoid unnecessary initiation of unused sensors and to avoid bugs due to sensor codes of unused sensors
…connection if Wire1 connection is initiated.
@IoTThinks
Copy link
Author

For quick reference, this is the undesired code in Arduino_LPS22HB
https://github.com/arduino-libraries/Arduino_LPS22HB/blob/master/src/BARO.cpp#L59

image

And this is the change in the local Arduino_LPS22HB
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