欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標題: stm32f407zg+mpu9250通過官方DMP庫串口輸出角度。 [打印本頁]

作者: 461534727    時間: 2019-7-10 10:49
標題: stm32f407zg+mpu9250通過官方DMP庫串口輸出角度。
基于stm32f407zg+mpu9250通過官方DMP庫串口輸出角度,本人項目用到陀螺儀,借鑒了眾多前輩的源碼,現在開放自己做項目過程中的源碼

單片機源程序如下:

  1. #include "stm32f4xx.h"
  2. #include "inv_mpu_dmp_motion_driver.h"
  3. #include "inv_mpu.h"
  4. #include "math.h"
  5. #include "usart.h"
  6. #include "stm32_iic.h"
  7. #include "stdio.h"
  8. #include "mpu_user_api.h"



  9. int main(void)
  10. {  
  11.     USART1_Config();  //串口初始化
  12.     i2cInit();      //IIC總線的初始化
  13.     delay_ms(10);
  14.                 Mpu_Init(1);


  15.     while(1)
  16.     {
  17.         
  18.         Update_attitude_Angle();

  19.             printf("Pitch:");
  20.             printf("%f \n",Pitch);


  21.             printf("Roll:");
  22.             printf("%f  \n",Roll);     


  23.             printf("Yaw:");        
  24.             printf("%f  \n",Yaw);
  25.   
  26.                                
  27.                                                 Update_Magnetometer();
  28.                                                 printf("M:%d \n",Direction);
  29.     }
  30. }
復制代碼

所有資料51hei提供下載:
MPU9250_F4.7z (406.93 KB, 下載次數: 99)



作者: yy咿呀咿呀喲    時間: 2021-2-4 20:28
這是模擬iic嗎?

作者: northerntree    時間: 2021-6-12 12:59
是用GPIO模擬的I2C還是stm單片機自帶的??




歡迎光臨 (http://m.raoushi.com/bbs/) Powered by Discuz! X3.1