MMS8452Q test program
Revision 2:b393024f4293, committed 2017-04-28
- Comitter:
- Rhyme
- Date:
- Fri Apr 28 04:10:24 2017 +0000
- Parent:
- 1:3607d35e1740
- Commit message:
- Format changed to be compatible with CSV
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Jan 13 23:59:52 2016 +0000
+++ b/main.cpp Fri Apr 28 04:10:24 2017 +0000
@@ -8,12 +8,15 @@
float x, y, z ;
MMA8452Q acc(PIN_SDA, PIN_SCL, MMA8452_I2C_ADDRESS);
+
+ printf("=== test MMA8452Q for %s (%s) ===\n",BOARD_NAME, __DATE__) ;
+ printf(" X, Y, Z\n") ;
while (true) {
x = acc.getAccX() ;
y = acc.getAccY() ;
z = acc.getAccZ() ;
- printf("X[%.2f] Y[%.2f] Z[%.2f]\n",x, y, z) ;
+ printf("%.2f, %.2f, %.2f\n",x, y, z) ;
wait(0.1);
}
}