Neil Thiessen
/
MAX17048_HelloWorld
A simple serial test program for the MAX17048 library.
Diff: main.cpp
- Revision:
- 0:54ca3b1d1f75
- Child:
- 1:d098c4448f6d
--- /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); + } +}