Skip to content

Conversation

@BertanT
Copy link
Contributor

@BertanT BertanT commented Nov 2, 2025

The example script seems to intend to print out the current in milliamperes, but is actually printing it out in amperes as per the API docs here. Similarly, it seems to intend to print power in milliwatts, but seems to actually print it in watts based on the api docs. This issue is also causing a loss in the precision of the readings due to the string formatting. I fixed it by just multiplying the API current and power outputs by 1000 before printing. Hope it helps :)

@BertanT BertanT changed the title Fix example displaying amperes instead of milliamperes Fix units of measurement in the example script Nov 2, 2025
@BlitzCityDIY BlitzCityDIY self-requested a review November 3, 2025 13:22
Copy link
Contributor

@BlitzCityDIY BlitzCityDIY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, thanks!

@BlitzCityDIY BlitzCityDIY merged commit a7cf909 into adafruit:main Nov 3, 2025
1 check passed
adafruit-adabot pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 4, 2025
Updating https://github.com/adafruit/Adafruit_CircuitPython_INA228 to 2.0.3 from 2.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_INA228#6 from BertanT/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP9808 to 3.3.30 from 3.3.29:
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP9808#42 from samblenny/fix-resolution-setter

Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 4.1.15 from 4.1.14:
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#217 from FoamyGuy/localize_more_tests
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.

2 participants