Test for MPU9250_SPI

Dependencies:   MPU9250_SPI mbed

Dependents:   MPU9250_SPI_Test_1201

The test code is working.

Revision:
2:6de3660a1f92
Parent:
1:7497c7952470
Child:
3:ad2ef67e7f72
--- a/main.cpp	Sun Jun 29 06:39:48 2014 +0000
+++ b/main.cpp	Sun Jun 29 07:06:53 2014 +0000
@@ -10,13 +10,13 @@
     if(imu.init(1,BITS_DLPF_CFG_5HZ)){  //INIT the mpu9250
         printf("\nCouldn't initialize MPU9250 via SPI!");
     }    
-    printf("\n\nWHOAMI=%u\n",imu.whoami()); //output the I2C address to know if SPI is working, it should be 104
+    printf("\nWHOAMI=0x%2x\n",imu.whoami()); //output the I2C address to know if SPI is working, it should be 104
     wait(1);    
-    printf("\nGyro_scale=%u\n",imu.set_gyro_scale(BITS_FS_2000DPS));    //Set full scale range for gyros
+    printf("Gyro_scale=%u\n",imu.set_gyro_scale(BITS_FS_2000DPS));    //Set full scale range for gyros
     wait(1);  
-    printf("\nAcc_scale=%u\n",imu.set_acc_scale(BITS_FS_16G));          //Set full scale range for accs
+    printf("Acc_scale=%u\n",imu.set_acc_scale(BITS_FS_16G));          //Set full scale range for accs
     wait(1);
-    printf("\n\nWHIAM=%u\n",imu.AK8963_whoami());
+    printf("AK8963 WHIAM=0x%2x\n",imu.AK8963_whoami());
     wait(0.1);  
     while(1) {
         //myled = 1;
@@ -25,7 +25,7 @@
         imu.read_acc();
         imu.read_rot();
         imu.AK8963_read_Magnetometer();
-        printf("%9.3f,%9.3f,%9.3f,%9.3f,%9.3f,%9.3f,%9.3f,%9.3f,%9.3f,%9.3f\n", 
+        printf("%10.3f,%10.3f,%10.3f,%10.3f,%10.3f,%10.3f,%10.3f,%10.3f,%10.3f,%10.3f\n", 
             imu.Temperature,
             imu.gyroscope_data[0],
             imu.gyroscope_data[1],