An i2c library to control the sw6115 chip found on DIY-More lithium battery shields
There is still a bunch of untapped potential in this chip. I have only written code for the basic stuff.
.readVbatt(); * returns battery voltage (mV).
.readVout(); * returns output voltage (mV).
.readIchrg(); * returns charging current (mA).
.readIdischrg(); * returns discharge current (mA).
.readTic(); * returns IC temperature (°C).
.readVntc(); * returns NTC voltage (mV).
.powerOff(); * Switches off battery-shield.
Don't forget to add pull-up resistors! (Anywhere between 4.7k and 10k should be fine)