Help with INA219 Library on ESP-IDF

williankleber
Posts: 5
Joined: Fri Nov 03, 2023 6:23 pm

Help with INA219 Library on ESP-IDF

Postby williankleber » Tue Aug 13, 2024 12:13 am

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!

MicroController
Posts: 1760
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Help with INA219 Library on ESP-IDF

Postby MicroController » Tue Aug 13, 2024 11:24 am

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 ?

Who is online

Users browsing this forum: No registered users and 73 guests