FCam1 / ESP32-INA226

Uase an ESP32 with the IDF SDK to measure current, tension and power with an INA226
9 stars 0 forks source link

INA226 or INA219 #1

Open yahaggach opened 3 years ago

yahaggach commented 3 years ago

Hello,

Is this library for the INA226 ? I have been taking a look at your configuration functions, specifically the mask used conjointly with register addresses. The register addresses are correct and the same between INA219 and INA226 but the masks (or bit shifting you use) should be different between INA226 and 219 (e.g the configuration register)

Bests

FCam1 commented 3 years ago

Hi,

Thank you for this remark.

This project is mostly a draft and if I remenber correctly my goal was to read quickly 3 INA226 : https://github.com/FCam1/ESP32-INA226/blob/da11a862fc7117679d5002b1f90f55a5603be45b/components/esp-idf-lib/components/i2cdev/i2cdev.c#L247 .

As I don't work anymore on this code, I can't garante its working.