Skip to content

Library crashes when using other I2C devices #2

Description

@d4nd4nd4nd4n

This INA220 library is awesome and it is working perfectly. Or perfectly until I add another I2C device to the bus. The other device works but INA220 dies.

For example I have the INA220 (addres 0x40) and an ADS1115 AD board (address 0x48) connected to the same I2C line on my ESP32. When INA220 is alone it works perfectly with this library. But when both devices are initialized, INA220 dies. It gives the same strange values with each read request.

But if I skip INA library and read manually the INA registers with the Wire library, I get the correct reading while also ADS1115 is initialized.

I can have both devices physically connected to the I2C line at the same time. Problems start when I initialize the libraries for the devices (ads.begin(); and ina220.begin(...);). If I only initialize INA library (ina220.begin(...)) the device works properly.

What could cause this?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions