Page 1 of 1

Help with INA219 Library on ESP-IDF

Posted: Tue Aug 13, 2024 12:13 am
by williankleber
Hello everyone,

I'm trying to work with the INA219 on ESP-IDF.

I'm having a really hard time trying to port any Arduino libraries to ESP-IDF, and the library: https://github.com/UncleRus/esp-idf-lib ... nts/ina219, which should already be fully ported, just isn't working for me. It shows a bunch of incompatibilities, and seems dependent on various third-party libraries that shouldn’t be necessary.

On Arduino and PIC, everything is so simple, but I'm really struggling with ESP-IDF and can't get my INA219 to work.

Does anyone have a minimal I2C library that I could use as a base to implement the INA219? Or better yet, does anyone have a fully functional INA219 library?

Thanks in advance!

Re: Help with INA219 Library on ESP-IDF

Posted: Tue Aug 13, 2024 11:24 am
by MicroController
williankleber wrote:
Tue Aug 13, 2024 12:13 am
It shows a bunch of incompatibilities,
What does that mean?
and seems dependent on various third-party libraries that shouldn’t be necessary.
What third-party libraries are you referring to? And what's the issue with one component using another component instead of duplicating its code?

Note that you need to check out the whole 'library' (https://github.com/UncleRus/esp-idf-lib/tree/master), not just the code of one component, as the components in that library depend on each other.

Have you tried the example?
Does anyone have a minimal I2C library that I could use as a base to implement the INA219?
How about https://docs.espressif.com/projects/esp ... s/i2c.html ? Or https://github.com/Nore5515/i2c_ina219 ?