nathancheek / ina220 Goto Github PK
View Code? Open in Web Editor NEWLightweight Arduino library for the INA220/INA220-Q1/INA219
License: GNU General Public License v3.0
Lightweight Arduino library for the INA220/INA220-Q1/INA219
License: GNU General Public License v3.0
can give an example of circuit application for assembly
This INA220 library is awesome and it is working perfectly. Or perfectly until I add another I2C device to the bus. The other device works but INA220 dies.
For example I have the INA220 (addres 0x40) and an ADS1115 AD board (address 0x48) connected to the same I2C line on my ESP32. When INA220 is alone it works perfectly with this library. But when both devices are initialized, INA220 dies. It gives the same strange values with each read request.
But if I skip INA library and read manually the INA registers with the Wire library, I get the correct reading while also ADS1115 is initialized.
I can have both devices physically connected to the I2C line at the same time. Problems start when I initialize the libraries for the devices (ads.begin(); and ina220.begin(...);). If I only initialize INA library (ina220.begin(...)) the device works properly.
What could cause this?
its possible mensure using 25uohm shunt resistor
{
INA_ADC_MODE_9BIT = 0x0,
INA_ADC_MODE_10BIT = 0x1,
INA_ADC_MODE_11BIT = 0x2,
INA_ADC_MODE_12BIT = 0x3,
INA_ADC_MODE_2AVG = 0x9,
INA_ADC_MODE_4AVG = 0x10,
INA_ADC_MODE_8AVG = 0x11,
INA_ADC_MODE_16AVG = 0x12,
INA_ADC_MODE_32AVG = 0x13,
INA_ADC_MODE_64AVG = 0x14,
INA_ADC_MODE_128AVG = 0x15
}; // of enumerated type
{
INA_ADC_MODE_9BIT = 0,
INA_ADC_MODE_10BIT = 1,
INA_ADC_MODE_11BIT = 2,
INA_ADC_MODE_12BIT = 3,
INA_ADC_MODE_2AVG = 9,
INA_ADC_MODE_4AVG = 10,
INA_ADC_MODE_8AVG = 11,
INA_ADC_MODE_16AVG = 12,
INA_ADC_MODE_32AVG = 13,
INA_ADC_MODE_64AVG = 14,
INA_ADC_MODE_128AVG = 15
}; // of enumerated type
This issue means the libary fails to compile on latest versions of Arduino
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.