Programming the Adafruit INA219 breakout board in Arduino, using the many boards that have I2C, is simple using our library:

Install the Library

Open up the Arduino library manager:

Search for the Adafruit INA219 library and install it

We also have a great tutorial on Arduino library installation at:

Load the Example

  • Select "File -> Examples -> Adafruit_INA219 -> getcurrent"
  • The "getcurrent" example code should open in a new IDE window.


Run it

  • 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:

Customize it

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.

This guide was first published on Oct 26, 2012. It was last updated on Jul 12, 2024.

This page (Arduino Code) was last updated on Jul 10, 2024.

Text editor powered by tinymce.