CPS-Lab1 / Mbed 2 deprecated Lab7

Dependencies:   MPL3115A2 mbed

Revision:
0:45ed48d2fec2
Child:
1:84b9a3e560fe
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Feb 23 17:51:02 2018 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "MPL3115.h"
+
+Serial pc(USBTX, USBRX);
+MPL3115 mpl(PB_7,PB_6);
+
+
+int main() {
+    pc.printf("Starting program\r\n");
+    // Set mpl to active
+    mpl.MPL3115::MPL3115_config();
+    while (1) {
+        float test;
+        mpl.acquire_MPL3115_data_Altitude_in_m(&test);
+        pc.printf("test = %f\r\n", test);
+        wait_ms(100);
+    }
+}
\ No newline at end of file