标题: 基于STM32的智能避障程序 [打印本页]

作者: 2225384891    时间: 2019-3-5 11:11
标题: 基于STM32的智能避障程序
基于STM32的智能避障程序

单片机源程序如下:
  1. #include "stm32f10x.h"
  2. #include "delay.h"
  3. #include "motor.h"
  4. #include "keysacn.h"
  5. #include "IRAvoid.h"
  6. #include <exti.h>

  7. /*
  8. void ZYSTM32_run(int speed,int time);       //前进函数
  9. void ZYSTM32_brake(int time);               //刹车函数
  10. void ZYSTM32_Left(int speed,int time);      //左转函数
  11. void ZYSTM32_Spin_Left(int speed,int time); //左旋转函数
  12. void ZYSTM32_Right(int speed,int time);     //右转函数
  13. void ZYSTM32_Spin_Right(int speed,int time);//右旋转函数
  14. void ZYSTM32_back(int speed,int time);      //后退函数

  15. */


  16. int main(void)
  17. {       
  18.          delay_init();
  19.          KEY_Init();
  20.          IRAvoidInit();
  21.          TIM4_PWM_Init(7199,0);  //初始化PWM
  22.          ZYSTM32_brake(500);
  23.          keysacn();



  24. while(1)
  25. {
  26.                   GPIO_ResetBits(GPIOA,GPIO_Pin_4);
  27.             GPIO_SetBits(GPIOB,GPIO_Pin_9);

  28. }


  29. }
复制代码

所有资料51hei提供下载:
智能小车红外避障实验(带后退掉头避障).7z (191.31 KB, 下载次数: 13)




作者: admin    时间: 2019-3-6 02:20
本帖需要重新编辑补全电路原理图,源码,详细说明与图片即可获得100+黑币(帖子下方有编辑按钮)




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