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 MPU6050-DMP_6DOF by
Revision 7:9797eb1bdc10, committed 2014-04-11
- Comitter:
- khaledelmadawi
- Date:
- Fri Apr 11 18:34:37 2014 +0000
- Parent:
- 6:029b4b8111ef
- Commit message:
- MPU6050 DMP
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 029b4b8111ef -r 9797eb1bdc10 main.cpp --- a/main.cpp Fri Jan 10 17:01:28 2014 +0000 +++ b/main.cpp Fri Apr 11 18:34:37 2014 +0000 @@ -101,7 +101,7 @@ // from the FIFO. Note this also requires gravity vector calculations. // Also note that yaw/pitch/roll angles suffer from gimbal lock (for // more info, see: http://en.wikipedia.org/wiki/Gimbal_lock) -//#define OUTPUT_READABLE_YAWPITCHROLL +#define OUTPUT_READABLE_YAWPITCHROLL // uncomment "OUTPUT_READABLE_REALACCEL" if you want to see acceleration // components with gravity removed. This acceleration reference frame is @@ -118,7 +118,7 @@ // uncomment "OUTPUT_TEAPOT" if you want output that matches the // format used for the InvenSense teapot demo -#define OUTPUT_TEAPOT +//#define OUTPUT_TEAPOT @@ -327,12 +327,12 @@ mpu.dmpGetQuaternion(&q, fifoBuffer); mpu.dmpGetGravity(&gravity, &q); mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); - pc.printf("ypr\t"); - pc.printf("%f3.2",ypr[0] * 180/M_PI); + pc.printf("ypr\t\r\n"); + pc.printf("%f3.2\r\n",ypr[0] * 180/M_PI); pc.printf("\t"); - pc.printf("%f3.2",ypr[1] * 180/M_PI); + pc.printf("%f3.2\r\n",ypr[1] * 180/M_PI); pc.printf("\t"); - pc.printf("%f3.2\n",ypr[2] * 180/M_PI); + pc.printf("%f3.2\r\n",ypr[2] * 180/M_PI); #endif #ifdef OUTPUT_READABLE_REALACCEL