標(biāo)題: 紅外遙控stm32平衡小車源碼 [打印本頁]

作者: 羅號    時間: 2017-12-14 12:34
標(biāo)題: 紅外遙控stm32平衡小車源碼
紅外遙控stm32
單片機源程序如下:
  1. #include "sys.h"
  2. #include "usart.h"               
  3. #include "delay.h"
  4. #include "usmart.h"
  5. #include "pid.h"
  6. #include "remote.h"
  7. float speedd;
  8. int main(void)
  9. {
  10.         Stm32_Clock_Init(9);
  11.         uart_init(72,9600);
  12.         delay_init(72);
  13.         MPU6050_Init();
  14.         LED_Init();
  15.         usmart_dev.init(72);        //初始化USMART       
  16.         encoder_init();
  17.         Remote_Init();
  18.         PWM_INT();
  19.         TIM3_Int_Init(99,7199);        //10ms進(jìn)入定時
  20.         TIM2_PWM_Init(255,0);//不分頻72M,周期為255
  21.         while(1)
  22.         {
  23.                 red_con();       
  24.         }
  25. }


復(fù)制代碼

所有資料51hei提供下載:
紅外遙控32平衡小車.rar (171.9 KB, 下載次數(shù): 14)







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