Skip to content

Commit

Permalink
Merge pull request #1 from adafruit/lib_files
Browse files Browse the repository at this point in the history
adding library, docs, example
  • Loading branch information
BlitzCityDIY authored Feb 2, 2025
2 parents ac9822d + 7ea9340 commit cdadbf5
Show file tree
Hide file tree
Showing 6 changed files with 437 additions and 18 deletions.
15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,23 @@ Usage Example
=============

.. code-block:: python
import time
import board
import adafruit_ina228
i2c = board.I2C()
ina228 = adafruit_ina228.INA228(i2c)
while True:
print(f"Current: {ina228.current:.2f} mA")
print(f"Bus Voltage: {ina228.voltage:.2f} V")
print(f"Shunt Voltage: {ina228.shunt_voltage*1000:.2f} mV")
print(f"Power: {ina228.power:.2f} mW")
print(f"Energy: {ina228.energy:.2f} J")
print(f"Temperature: {ina228.temperature:.2f} °C")
time.sleep(1)
Documentation
=============
API documentation for this library can be found on `Read the Docs <https://docs.circuitpython.org/projects/ina228/en/latest/>`_.
Expand Down
Loading

0 comments on commit cdadbf5

Please sign in to comment.