Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Hello_FXOS8700Q by
Revision 0:748fe54f0947, committed 2014-04-19
- 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
--- /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
