I'm not sure why, but the power values are never calculated whenever I run the Arduino code, and the bus voltage fluctuates in its values often.
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_INA260.h>
Adafruit_INA260 ina260 = Adafruit_INA260();
void setup() {
Serial.begin(115200);
// Wait until serial port is opened
while (!Serial) { delay(10); }
Serial.println("Adafruit INA260 Test");
if (!ina260.begin()) {
Serial.println("Couldn't find INA260 chip");
while (1);
}
Serial.println("Found INA260 chip");
}
void loop() {
Serial.print("Current: ");
Serial.print(ina260.readCurrent());
Serial.println(" mA");
Serial.print("Bus Voltage: ");
Serial.print(ina260.readBusVoltage());
Serial.println(" mV");
Serial.print("Power: ");
Serial.print(ina260.readPower());
Serial.println(" mW");
Serial.println();
delay(1000);
}
This is the code that I used to run on the Arduino IDE
Current: 6.25 mA
Bus Voltage: 0.00 mV
Power: 0.00 mW
Current: 7.50 mA
Bus Voltage: 0.00 mV
Power: 0.00 mW
Current: 7.50 mA
Bus Voltage: 23.75 mV
Power: 0.00 mW
Current: 7.50 mA
Bus Voltage: 21.25 mV
Power: 0.00 mW
Current: 8.75 mA
Bus Voltage: 3.75 mV
Power: 0.00 mW
And these are the data values that come up whenever I run the code.