chrisb2 / pi_ina219

This Python library supports the INA219 voltage, current and power monitor from Texas Instruments with a Raspberry Pi using the I2C bus. The intent of the library is to make it easy to use the quite complex functionality of this sensor.
MIT License
114 stars 34 forks source link

Added method is_conversion_ready() to class INA219 #25

Closed Tobola closed 3 years ago

Tobola commented 4 years ago

Proposing the method is_conversion_ready() to class INA219 for checking if conversion was done. The method is checking bit CNVR in the voltage register according to INA219 datasheet. This function is useful when streaming data seamlessly and without losses. With this is_conversion_ready() can be used for checking if conversion was done before reading the next measurement results.

chrisb2 commented 4 years ago

Sorry for delay in responding I missed the email. This looks good, can you just update the readme to include this method? Your comment above contains all the info to document this method I think. Thx

Tobola commented 3 years ago

I have added an entry regarding is_conversion_ready() to the read.me .

chrisb2 commented 3 years ago

Published to PyPi as version 1.4.0, thanks for your contribution.