Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Subfact_ina219.py to read the current safely #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

h-matsuo
Copy link

According to the official Arduino library (https://github.com/adafruit/Adafruit_INA219),
sometimes the INA219 will be reset because of a sharp load.

To avoid this, add the code that re-calibrates INA219 every time you read the current.

Accorindg to the official Arduino library (https://github.com/adafruit/Adafruit_INA219):
    (In Adafruit_INA219.cpp, line 406-409)
    Sometimes a sharp load will reset the INA219, which will
    reset the cal register, meaning CURRENT and POWER will
    not be available ... avoid this by always setting a cal
    value even if it's an unfortunate extra step

So, I add the re-calibration code into Subfact_ina219.py
@h-matsuo h-matsuo changed the title Update Subfact_ina219.py to read current safely Update Subfact_ina219.py to read the current safely Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant