Arduino code:
// Read current drain from Battery Baby Sitter
int current = lipo.current(AVG); // Read average current (in mA)
Serial.println(“Current: " + String(current) + " mA”);
reports Current: -11 mA
Arduino code:
// Read current drain from Battery Baby Sitter
int current = lipo.current(AVG); // Read average current (in mA)
Serial.println(“Current: " + String(current) + " mA”);
reports Current: -11 mA
Yes. Can I assume a positive reading means the battery is charging and a negative reading means the battery is draining?
No need to assume. If you have a doubt, verify battery charge/discharge with a multimeter, and compare with the device report.
When I ran the sample code it showed + mA while charging, and 0 mA after charging stopped. When I hooked it into an actual circuit doing something, on battery alone it showed -11 mA, but with power plugged in also and not charging it showed 0 mA. So I know the circuit was still drawing power, but from the power supply, not the battery. So even though I have not had a chance to test it yet, I would assume while it was actively charging the battery, I would see a larger + mA value.