A simple serial test program for the MAX17048 library.

Dependencies:   MAX17048 mbed

Files at this revision

API Documentation at this revision

Comitter:
neilt6
Date:
Tue Nov 12 17:49:22 2013 +0000
Parent:
5:84c012fa8a26
Child:
7:41a2c68d4a93
Commit message:
Updated to demonstrate loading the default compensation value with the improved MAX17048 library

Changed in this revision

MAX17048.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MAX17048.lib	Thu Nov 07 18:23:47 2013 +0000
+++ b/MAX17048.lib	Tue Nov 12 17:49:22 2013 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/neilt6/code/MAX17048/#6927c72b2923
+http://mbed.org/users/neilt6/code/MAX17048/#bf6972a21c61
--- a/main.cpp	Thu Nov 07 18:23:47 2013 +0000
+++ b/main.cpp	Tue Nov 12 17:49:22 2013 +0000
@@ -9,6 +9,9 @@
     if (gauge.open()) {
         printf("Device detected!\n");
 
+        //Load the default compensation value
+        gauge.compensation(MAX17048::RCOMP0);
+
         while (1) {
             //Print the current state of charge
             printf("SOC = %f%%\n", (float)gauge);