標(biāo)題: 基于STM32的智能避障程序 [打印本頁(yè)]

作者: 2225384891    時(shí)間: 2019-3-5 11:11
標(biāo)題: 基于STM32的智能避障程序
基于STM32的智能避障程序

單片機(jī)源程序如下:
  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);       //前進(jìn)函數(shù)
  9. void ZYSTM32_brake(int time);               //剎車函數(shù)
  10. void ZYSTM32_Left(int speed,int time);      //左轉(zhuǎn)函數(shù)
  11. void ZYSTM32_Spin_Left(int speed,int time); //左旋轉(zhuǎn)函數(shù)
  12. void ZYSTM32_Right(int speed,int time);     //右轉(zhuǎn)函數(shù)
  13. void ZYSTM32_Spin_Right(int speed,int time);//右旋轉(zhuǎn)函數(shù)
  14. void ZYSTM32_back(int speed,int time);      //后退函數(shù)

  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. }
復(fù)制代碼

所有資料51hei提供下載:
智能小車紅外避障實(shí)驗(yàn)(帶后退掉頭避障).7z (191.31 KB, 下載次數(shù): 13)




作者: admin    時(shí)間: 2019-3-6 02:20
本帖需要重新編輯補(bǔ)全電路原理圖,源碼,詳細(xì)說(shuō)明與圖片即可獲得100+黑幣(帖子下方有編輯按鈕)




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