Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 755 Bytes

README.md

File metadata and controls

39 lines (30 loc) · 755 Bytes

MAX17048

Arduino library for MAX17048/MAX17049 1-Cell/2-Cell Fuel Gauge with ModelGauge

Usage

#include "MAX17048.h"

MAX17048 pwr_mgmt;

void setup()
{
    Serial.begin(115200);
    Wire.begin();
    pwr_mgmt.attatch(Wire);
}

void loop()
{
    Serial.print("VCELL ADC : ");
    Serial.println(pwr_mgmt.adc());
    Serial.print("VCELL V   : ");
    Serial.println(pwr_mgmt.voltage());
    Serial.print("VCELL SOC : ");
    Serial.print(pwr_mgmt.percent());
    Serial.println(" \%");
    Serial.print("VCELL SOC : ");
    Serial.print(pwr_mgmt.accuratePercent());
    Serial.println(" \%");
    Serial.println();
    delay(1000);
}

License

MIT