Programming the Adafruit INA219 breakout board is simple using our library:
Expand the .zip file to the Libraries folder in your Arduino Sketchbook folder (If you don't know where this is, open File->Preferences in the IDE and it will tell you the location of your sketchbook folder).
Rename the folder to Adafruit_INA219
Close all instances of the IDE, then re-open one, so that the IDE will recognize the new library.
Load the Example
The "getcurrent" example code should open in a new IDE window.
Click on the upload button in the IDE. When it is "done uploading"
Open your Serial Monitor and set the speed to 115200 baud.
The output should appear similar to the sample below:
Last updated on Nov 17, 2017
Published on Oct 26, 2012
You can adapt, expand or modify the example code to suit your project requirements. For a detailed description of the available library functions, see the Library Reference
on the next page: