Skip to content

BME280 module does not allow coexistence of two BME280s on the same I2C bus #2241

@mickley

Description

@mickley

Expected behavior

The BME280 supports two different I2C addresses, so two BME280s can be used on the same bus. This should be possible under nodemcu

Actual behavior

The bme280 module doesn't allow the I2C address to be set and instead looks for devices on the first address, and failing to find one, looks on the second address. Therefore, if 2 devices are present, only the first can be used.

It would be better if BME280 functions had an optional address parameter to allow for multiple devices.

NodeMCU version

Dev: ed56d94

Hardware

WeMos D1 Mini, with two BME280s connected to the same i2c bus.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions