# INA226 component for ESP-IDF [](https://github.com/cybergear-robotics/ina226/actions/workflows/build_example.yml) [](https://opensource.org/licenses/MIT) [](https://GitHub.com/cybergear-robotics/ina226/graphs/commit-activity) [](https://shields.io/) [](https://shields.io/) ## Using component ```bash idf.py add-dependency "cybergear-robotics/ina226" ``` ## Example Not all examples are ported. For further examples, please look at the original project. 1. create example project ```bash idf.py create-project-from-example "cybergear-robotics/ina226:read_voltage" ``` 2. Go to to example directory (for example `read_voltage`) `cd read_voltage` 3. Set ESP chip `idf.py set-target esp32` 4. Configure I2C settings `idf.py menuconfig` 5. Build, flash `idf.py build flash monitor` ## Hardware test The Unity hardware test is self-contained in `test/` and uses I2C port 0, SCL GPIO 11, and SDA GPIO 12 by default. It expects 24.0 V on the INA226 bus input, with a 0.5 V tolerance. All values can be changed with `idf.py menuconfig`. Run it from the component repository: ```bash idf.py -C test_app build flash monitor ```
45cd5d5ff6c62d09c3cfeb328b20b8d1a03cd424
idf.py add-dependency "cybergear-robotics/ina226^1.2.0"