A simple serial test program for the MAX17048 library.

Dependencies:   MAX17048 mbed

Files at this revision

API Documentation at this revision

Comitter:
neilt6
Date:
Wed Aug 14 05:03:09 2013 +0000
Child:
1:d098c4448f6d
Commit message:
Initial commit

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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MAX17048.lib	Wed Aug 14 05:03:09 2013 +0000
@@ -0,0 +1,1 @@
+MAX17048#0a98e081b48c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Aug 14 05:03:09 2013 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+#include "MAX17048.h"
+
+MAX17048 gauge(p28, p27);
+
+int main() {
+    while (1) {
+        //Read the cell voltage
+        float vcell = gauge.vcell();
+
+        //Print the cell voltage
+        printf("Vcell = %f\n", vcell);
+
+        //Sleep for 0.5 seconds
+        wait(0.5);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Aug 14 05:03:09 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/5798e58a58b1
\ No newline at end of file