Skip to content

Arduino_LPS22HB breaks Wire connection #1252

@IoTThinks

Description

@IoTThinks

Hi all,
When I enable -D ENV_PIN_SDA=41 and -D ENV_PIN_SCL=42 for my Heltec v3 to use Wire1, I realize Wire connection to OLED has been broken.

https://github.com/arduino-libraries/Arduino_LPS22HB/blob/master/src/BARO.cpp#L48

After a day of tracing, I found this in Arduino_LPS22HB.
Image

The Wire.begin initializes the I2C again and Wire.end will break the Wire connection. Therefore, the OLED will stop working after "Please wait..."
Image

It is a bit weird as this only happens when we enable -D ENV_PIN_SDA=41 and -D ENV_PIN_SCL=42 to use Wire1.
For other sensor libraries like BME280 and BME680, Wire connection is managed by MeshCore instead which is correct.

We may need to modify Arduino_LPS22HB to fit to MeshCore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions