标题: 基于STM32的三路避障小车源程序 [打印本页]

作者: lee2018    时间: 2020-3-18 10:01
标题: 基于STM32的三路避障小车源程序
本来是想做灭火小车的,只是程序不够严谨,所以只传了避障部分,后面有时间修改再传个完整版。

制作出来的实物图如下:


单片机源程序如下:
  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. }
复制代码

所有资料51hei提供下载:
Cars.zip (389.15 KB, 下载次数: 20)







欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1