A data logger for the FRDM-K64F taking readings from the FXOS8700CQ accelerometer/magnometer at 200Hz.

Dependencies:   FXOS8700CQ SDFileSystem mbed

Fork of Hello_FXOS8700Q by Jim Carver

Files at this revision

API Documentation at this revision

Comitter:
JimCarver
Date:
Sat Apr 19 17:44:07 2014 +0000
Child:
1:7fab51ab8364
Commit message:
Simple Hello World for FXAS8700Q

Changed in this revision

FXOS8700Q.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/FXOS8700Q.lib	Sat Apr 19 17:44:07 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/JimCarver/code/FXOS8700Q/#be6abf9f2d59
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Apr 19 17:44:07 2014 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+#include "FXOS8700Q.h"
+
+FXOS8700Q combo( A4, A5, FXOS8700CQ_SLAVE_ADDR0);
+Serial pc(USBTX, USBRX);
+
+
+int main() {
+float acc_data[3], mag_data[3];
+
+printf("\r\n\nFXOS8700Q Who Am I= %X\r\n", combo.getWhoAmI());
+    while (true) {
+        combo.getAccAllAxis(acc_data);
+        combo.getMagAllAxis(mag_data);
+        printf("FXOS8700Q ACC: X=%1.4f Y=%1.4f Z=%1.4f  ", acc_data[0], acc_data[1], acc_data[2]);
+        printf("    MAG: X=%4.1f Y=%4.1f Z=%4.1f\r\n\n", mag_data[0], mag_data[1], mag_data[2]);
+        wait(1.0);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Apr 19 17:44:07 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6473597d706e
\ No newline at end of file