標(biāo)題: 基于STM32的三路避障小車源程序 [打印本頁]

作者: lee2018    時(shí)間: 2020-3-18 10:01
標(biāo)題: 基于STM32的三路避障小車源程序
本來是想做滅火小車的,只是程序不夠嚴(yán)謹(jǐn),所以只傳了避障部分,后面有時(shí)間修改再傳個(gè)完整版。

制作出來的實(shí)物圖如下:


單片機(jī)源程序如下:
  1. #include "stm32f10x.h"                 // Device header
  2. #include "car.h"
  3. #include "delay.h"
  4. #include "chaoshengbo.h"
  5. #include "PWM_Output.h"
  6. #include "timer.h"



  7. int main(void)
  8. {       

  9.     Sys_Delay_Init(72);               

  10.           TIM2_Init();
  11.                 Chaoshengbo_Init();
  12.     TIM4_PWM_Init();

  13.           Car_Stop(0);
  14.                 Delay_1ms(100);

  15.                 while(1)
  16.                 {       
  17.                         ChaoShengBo_Run();
  18.                 }


  19. }
復(fù)制代碼

所有資料51hei提供下載:
Cars.zip (389.15 KB, 下載次數(shù): 20)







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