Skip to content

Releases: wollewald/INA226_WE

Eliminated Range Setting

09 Dec 14:44
1c01dcf
Compare
Choose a tag to compare

Setting the range to 0.8 or 0.4 amperes was not useful. Setting the 0.4 ampere range suggested an increased resolution. But the resolution is given by the shunt voltage register resolution.

Compatibility with INA219_WE

22 Oct 09:11
0862933
Compare
Choose a tag to compare

When I developed the library I did not choose the best enum names for the measure modes. E.g. "POWER_DOWN" is also used in INA219_WE. If you have problems then uncomment the line: #define INA226_WE_COMPATIBILITY_MODE_ in INA226_WE_config.h and use "INA226_POWER_DOWN" instead of "POWER_DOWN". Do the same for "CONTINUOUS" (-> INA226_CONTINUOUS) AND TRIGGERED (-> INA226_TRIGGERED).

Added a function to return the I2C error code

11 Oct 14:06
510b269
Compare
Choose a tag to compare

I added the function getI2cErrorCode() which return the return value of endTransmission. I updated the example sketches Trigger.ino and Continuous.ino to show how it works.

I have also added a timeout check for startSingleMeasurement() of 2 seconds to avoid that the program hangs forever in case of unavailability of the INA226.

Replaced defines by constexpr

23 Oct 13:43
c55693c
Compare
Choose a tag to compare

Several changes:

  • tidied constructors
  • replaced #defines by constexpr
  • replaced C-Cast by static_cast
  • replace private by protected
  • corrected typos in example sketches

Added comments about poor quality modules in readme

16 Aug 19:06
1a7bff3
Compare
Choose a tag to compare

Added comments about poor quality modules in readme

Read performance increase

03 Sep 15:25
6dfe091
Compare
Choose a tag to compare

In the readRegister function, I have added a "false" in Wire.endTransmission() ---> Wire.endTransmission(false) before Wire.requestFrom(). This saves some microseconds.

TwoWire object can now be passed to the constructor

15 May 11:14
198640f
Compare
Choose a tag to compare

There are now new options to create your INA226 object:

  • INA226_WE ina226 = INA226_WE() -> uses Wire / I2C Address = 0x40
  • INA226_WE ina226 = INA226_WE(ICM20948_ADDR) -> uses Wire / I2C_ADDRESS
  • INA226_WE ina226 = INA226_WE(&wire2) -> uses the TwoWire object wire2 / I2C_ADDRESS
  • INA226_WE ina226 = INA226_WE(&wire2, I2C_ADDRESS) -> all together

This enables you to e.g. to use the two ESP32 I2C busses

Several new functions

06 Apr 16:19
63d47fb
Compare
Choose a tag to compare

measureMode -> INA226measureMode in enum to stop clash with ADS1115_WE
init() checks existance of device and returns 1 if it exists else 0
added getShuntVolatage_V method
added getCurrent_A method
added startSingleMeasurementNoWait method
added isBusy method

English documentation available now

03 Jan 16:14
59e4656
Compare
Choose a tag to compare

English documentation now available:

https://wolles-elektronikkiste.de/en/ina226-current-and-power-sensor

And some typos corrected in comments in example sketches.

No change to the code.

You can choose a resistor now

04 Sep 17:12
dc8a4a3
Compare
Choose a tag to compare

With this version it is possible to choose a resistor. So you could use the INA226 IC instead of the module and take the resistor which suits you best. An example (Continuous_With_Resistor_Value.ino) has been added.