新手上路
- 积分
- 44
- 金钱
- 44
- 注册时间
- 2018-3-2
- 在线时间
- 9 小时
|
1金钱
while(1)
{
delay_ms(200);
LEDB_TOG;
temp=MPU_Get_Temperature(); //μÃμ½Î¶èÖμ
MPU_Get_Accelerometer(&aacx,&aacy,&aacz); //μÃμ½¼óËù¶è′«¸DÆ÷êy¾Y
MPU_Get_Gyroscope(&gyrox,&gyroy,&gyroz); //μÃμ½íóÂYòÇêy¾Y
mpu_mpl_get_data(&pitch,&roll,&yaw);
// printf("gx=%f\r\n",gyrox/16.4);
// printf("gy=%f\r\n",gyroy/16.4);
// printf("gz=%f\r\n",gyroz/16.4);
printf("ax=%d\r\n",aacx/4096);
printf("ay=%d\r\n",aacy/4096);
printf("az=%d\r\n",aacz/4096);
//printf("T=%f\r\n",temp/100.0);
|
|