Skip to main content

CircuitPython driver for the TI INA260 current and power sensor

Project description

Introduction

Documentation Status Discord Build Status Code Style: Ruff

CircuitPython driver for the TI INA260 current and power sensor

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

pip3 install adafruit-circuitpython-ina260

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-ina260

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-ina260

Usage Example

import time
import board
import adafruit_ina260

i2c = board.I2C()
ina260 = adafruit_ina260.INA260(i2c)
while True:
    print("Current: %.2f Voltage: %.2f Power:%.2f"
        %(ina260.current, ina260.voltage, ina260.power))
    time.sleep(1)

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit_circuitpython_ina260-1.3.19.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file adafruit_circuitpython_ina260-1.3.19.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_ina260-1.3.19.tar.gz
Algorithm Hash digest
SHA256 c9262a58b3f9b30c7ea6b21ed00ad90b551b4a9e41fa9e6646f90823f61adcc4
MD5 a0aba7bf07c06d6e2e8fe13ded987088
BLAKE2b-256 aadac93adf9e47c666800720670416a80054a1a398326f0fc3f3a30fed95cf67

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_ina260-1.3.19-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_ina260-1.3.19-py3-none-any.whl
Algorithm Hash digest
SHA256 2293089054dce4e53285f32917153446345c2110bd1d95afe97cd191881f02fe
MD5 ac8a07401585a557468b15a3b37ae422
BLAKE2b-256 680e0ec382b08914dcfbe520c3018371ddc89f997a3902c702e4f42d7c82df6a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page