A simple serial test program for the MAX17048 library.

Dependencies:   MAX17048 mbed

Revision:
3:2152dd143ba3
Parent:
1:d098c4448f6d
Child:
6:20e76649ba57
--- a/main.cpp	Fri Aug 30 16:00:43 2013 +0000
+++ b/main.cpp	Mon Sep 16 22:04:00 2013 +0000
@@ -10,16 +10,13 @@
         printf("Device detected!\n");
 
         while (1) {
-            //Read the cell voltage
-            float vcell = gauge.vcell();
-
-            //Print the cell voltage
-            printf("Vcell = %f\n", vcell);
+            //Print the current state of charge
+            printf("SOC = %f%%\n", (float)gauge);
 
             //Sleep for 0.5 seconds
             wait(0.5);
         }
     } else {
-        printf("Device not detected!\n");
+        error("Device not detected!\n");
     }
 }