MAX17043 – Arduino library

Use

First include in your sketch MAX17043 and Wire libraries:
#include "MAX17043.h"
#include "Wire.h"

Define a new object from the MAX17043 class:
MAX17043 batteryMonitor;

In the setup() section, initialize the Wire library; then call reset() and quickStart() method:
Wire.begin();
batteryMonitor.reset();
batteryMonitor.quickStart();

You can now call the following methods:

float getVCell();

returns the battery’s voltage

float getSoC();

returns the battery’s state of charge (%)

int getVersion();

returns the IC version

byte getCompensateValue();

returns the compensation value; that is the value, related to the chemistry of your particular battery, that improves IC accuracy (Maxim offers a service to analize your battery and to give you the best value)

byte getAlertThreshold();

returns the value (%) of remaining charge under which the alert is triggered

void setAlertThreshold(byte threshold);

sets the value (%) of remaining charge under which the alert is triggered

boolean inAlert();

returns the alert state of the IC (is actual charge under threshold?)

void clearAlert();

clears the alert: you always have to clear it manually

Pages: 1 2 3

This website uses cookies to ensure you get the best experience on our website maggiori informazioni

Questo sito utilizza i cookie per fonire la migliore esperienza di navigazione possibile. Continuando a utilizzare questo sito senza modificare le impostazioni dei cookie o clicchi su "Accetta" permetti al loro utilizzo.

Chiudi