MAX1704x Battery Fuel Gauge

Use the MAX1704x (About Modules) module to track Li+ battery relative state-of-charge with MAX17048/MAX17049 fuel gauge chips. Basic usage:

I2C1.setup({scl:D6,sda:D7});
var fuelGauge = require("MAX1704x").connect(I2C1);
console.log(`IC Version: 0x${fuelGauge.readICVersion()}`);
console.log(`Battery percent: ${fuelGauge.readPercent()} %`);
console.log(`Battery voltage: ${fuelGauge.readVoltage()} V`);
console.log(`Battery charge rate: ${fuelGauge.readChargeRate()} %/hr`);

Reference

MAX1704X.prototype.reset = function () { ... }

MAX1704X.prototype.readRegister = function (register) { ... }

MAX1704X.prototype.readICVersion = function () { ... }

MAX1704X.prototype.readPercent = function () { ... }

MAX1704X.prototype.readVoltage = function (callback) { ... }

MAX1704X.prototype.readChargeRate = function (callback) { ... }

exports.connect = function (_i2c) { ... }

Using

(No tutorials are available yet)

This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.