You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
readRegister misses error checking of the i2c calls. If for example requestFrom fails, i.e. returns 0, or no data is available, the function returns 0. This causesgetBusVoltage_V to return zero when there is a problem with the i2c bus, so we don't know if the read failed or actually reading zero voltage.
The text was updated successfully, but these errors were encountered:
@fl4p, 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.
The changes are implemented in the new release 1.2.7.
Hi,
readRegister
misses error checking of the i2c calls. If for examplerequestFrom
fails, i.e. returns0
, or no data is available, the function returns 0. This causesgetBusVoltage_V
to return zero when there is a problem with the i2c bus, so we don't know if the read failed or actually reading zero voltage.The text was updated successfully, but these errors were encountered: