/*=====================================================================================================*/ void BSM_Loop( void ) { int16_t imu[10] = {0}; while(1) { MPU9250_getData(imu); printf("AX:%5i\tAY:%5i\tAZ:%5i\tGX:%5i\tGY:%5i\tGZ:%5i\tMX:%5i\tMY:%5i\tMZ:%5i\r\n", imu[1], imu[2], imu[3], imu[4], imu[5], imu[6], imu[7], imu[8], imu[9]); delay_ms(100); } }
int main( void ) { int16_t dataIMU[10] = {0}; System_Init(); while(1) { LED4_Toggle(); Delay_100ms(5); MPU9250_getData(dataIMU); printf("Acc.X = %d\tAcc.Y = %d\tAcc.Z = %d\tGyr.X = %d\tGyr.Y = %d\tGyr.Z = %d\tMag.X = %d\tMag.Y = %d\tMag.Z = %d\tTemp = %d\r\n", dataIMU[1], dataIMU[2], dataIMU[3], dataIMU[4], dataIMU[5], dataIMU[6], dataIMU[7], dataIMU[8], dataIMU[9], dataIMU[0]); } }