![](/media/cache/group/IMG_1289.JPG.50x50_q85.jpg)
Test program for FXOS8700CQ. Minimum functionality has been implemented, so far.
Dependencies: FXOS8700CQ mbed vt100
Diff: main.cpp
- Revision:
- 1:4bb4d99d4be5
- Parent:
- 0:6a51e9fa41a0
--- a/main.cpp Fri Dec 25 05:43:12 2015 +0000 +++ b/main.cpp Mon Apr 24 06:53:17 2017 +0000 @@ -23,9 +23,13 @@ fxos = new FXOS8700CQ(PIN_SDA, PIN_SCL, FXOS8700CQ_I2C_ADDRESS) ; fxos->init() ; + printf("=== test FXOS8700CQ for %s (%s) ===\n", BOARD_NAME, __DATE__) ; + printf("ACC_X, ACC_Y, ACC_Z, MGN_X, MGN_Y, MGN_Z\n") ; + while(1) { fxos->readAccMgnData(accData, mgnData) ; - printf("ACC X[%d], Y[%d], Z[%d], MGN X[%d], Y[%d], Z[%d]\n", +// printf("ACC X[%d], Y[%d], Z[%d], MGN X[%d], Y[%d], Z[%d]\n", + printf("%6d, %6d, %6d, %6d, %6d, %6d\n", accData[0], accData[1], accData[2], mgnData[0], mgnData[1], mgnData[2]) ; wait(0.2) ;