From 0f0e4429e4023f4594241adc45778b7d1586b6ef Mon Sep 17 00:00:00 2001 From: Raphael Pereira Date: Mon, 1 Mar 2021 19:21:18 -0300 Subject: [PATCH] Update getcurrent.ino --- examples/getcurrent/getcurrent.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/getcurrent/getcurrent.ino b/examples/getcurrent/getcurrent.ino index d981aed..05da783 100644 --- a/examples/getcurrent/getcurrent.ino +++ b/examples/getcurrent/getcurrent.ino @@ -43,7 +43,7 @@ void loop(void) busvoltage = ina219.getBusVoltage_V(); current_mA = ina219.getCurrent_mA(); power_mW = ina219.getPower_mW(); - loadvoltage = busvoltage + (shuntvoltage / 1000); + loadvoltage = busvoltage - (shuntvoltage / 1000); Serial.print("Bus Voltage: "); Serial.print(busvoltage); Serial.println(" V"); Serial.print("Shunt Voltage: "); Serial.print(shuntvoltage); Serial.println(" mV");