blue mbed code for the BNO055 imu from adafruit
Dependencies: BNO055 MODSERIAL mbed
Fork of bmbed_lidar_belt by
Revision 19:01d091b38d61, committed 2015-11-27
- Comitter:
- rkk
- Date:
- Fri Nov 27 18:34:19 2015 +0000
- Parent:
- 18:4166eff01d7b
- Commit message:
- acceleration
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Nov 25 23:24:00 2015 +0000 +++ b/main.cpp Fri Nov 27 18:34:19 2015 +0000 @@ -67,22 +67,27 @@ imu.get_calib(); } - char sendData[1] = {0x00}; +// char sendData[1] = {0x00}; // char btData[12] = {'a','b','c','d','e','f','g','\n','\0'}; while (1) { - imu.get_angles(); - float pitch = imu.euler.pitch; - pc.printf("%f\n",pitch); -// pc.printf("about to send data\n"); + //imu.get_angles(); + //float pitch = imu.euler.pitch; + //float yaw = imu.euler.yaw; + //float roll = imu.euler.roll; + //pc.printf("r:%6.2f p:%6.2f y:%6.2f\n",roll, pitch, yaw); + imu.get_accel(); //query the i2c device + pc.printf("x:%6.2f y:%6.2f z:%6.2f\n",imu.accel.x, imu.accel.y, imu.accel.z); +// + //pc.printf("about to send data\n"); // for(int j=0;j<9;j++){ // btData[j] = '\0'; // if(bt.writeable()) // bt.putc(btData[j]); // //wait(0.001); // } - wait(0.5); + wait(0.3); //pc.printf("finished sending data\n"); } }