Releases: wollewald/INA219_WE
Additional startSingleMeasurement option
Under certain circumstancesoccasions the code gets stuck while calling startSingleMeasurement if there are I2C connection issues. Therefore an additional function including a timeout for the wait-for-conversion loop has been added.
Corrected typos in Public Function pdf
Just corrected some typos - no change of code
Read performance increase
In the readRegister function, I have added a "false" in Wire.endTransmission() ---> Wire.endTransmission(false) before Wire.requestFrom(). This saves some microseconds.
Overflow check now covers also shunt register overflows
The overflow check had only checked the overflow flag. This flag only covers math overflows in the current or power register. Shunt register overflows are now also included now.
Fixed incompatibility with ADS1115_WE library
Some enums had identical names in INA219_WE and ADS1115_WE which made them incompatible.
Typos corrected
No change to the code vs. version 1.2.0, just corrected typos in comments
Change of shunt size now possible
I have added a function "setShuntSizeInOhms" and an example.
In some comments in the example I changed the German decimal commas to decimal points.
Made readRegister and writeRegister public so error checking is possible
Made readRegister and writeRegister public so error checking is possible
TwoWire object can now be passed to the constructor
You can now pass a TwoWire object to the constructor. This enables you e.g. to use two I2C busses on an ESP32:
- INA219_WE ina219 = INA219_WE() -> uses Wire / I2C Address = 0x40
- INA219_WE ina219 = INA219_WE(ICM20948_ADDR) -> uses Wire / I2C_ADDRESS
- INA219_WE ina219 = INA219_WE(&wire2) -> uses the TwoWire object wire2 / I2C_ADDRESS
- INA219_WE ina219 = INA219_WE(&wire2, I2C_ADDRESS) -> all together
English documentation available
English documentation now available on:
https://wolles-elektronikkiste.de/en/ina219-current-and-power-sensor