flav1972 / ArduinoINA219

An Arduino library for the INA219 I2C current monitor
17 stars 16 forks source link

Specify adress of INA219 devices on bus #17

Open Tobbera opened 3 years ago

Tobbera commented 3 years ago

Seems like I cant specify on what adress my INA219 devices are listening on the bus. There is a reference in the .h file but I cant find any documentation on how to use it.


class INA219
{
  public:

    ///I2C address definations.
    /// Adafruit breakout board have two jumppers to set unique
    /// address for each board ( in case there is more than one in Your system)
    /// base address is 0x40, no jumpers needed)
    enum t_i2caddr{
      I2C_ADDR_40 = 0x40, ///< address 0x40 no jumpers required.
      I2C_ADDR_41 = 0x41, ///< address 0x41 bridge A0.
      I2C_ADDR_44 = 0x44, ///< address 0x44 bridge A1.
      I2C_ADDR_45 = 0x45 ///< address 0x45 bridge A0 & A1.
    };
Ceras commented 11 months ago

It's a Very late answer, but in case someone else, like me, finds this and need the same info.

This worked for me: INA219 monitor; INA219 monitor2(INA219::I2C_ADDR_41);

Tobbera commented 11 months ago

Thanks! Will try when I get a chance.