找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 1984|回復: 1
打印 上一主題 下一主題
收起左側

基于STM32的智能避障程序

[復制鏈接]
跳轉到指定樓層
樓主
ID:433935 發(fā)表于 2019-3-5 11:11 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
基于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);       //前進函數(shù)
  9. void ZYSTM32_brake(int time);               //剎車函數(shù)
  10. void ZYSTM32_Left(int speed,int time);      //左轉函數(shù)
  11. void ZYSTM32_Spin_Left(int speed,int time); //左旋轉函數(shù)
  12. void ZYSTM32_Right(int speed,int time);     //右轉函數(shù)
  13. void ZYSTM32_Spin_Right(int speed,int time);//右旋轉函數(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. }
復制代碼

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



分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏1 分享淘帖 頂 踩
回復

使用道具 舉報

沙發(fā)
ID:1 發(fā)表于 2019-3-6 02:20 | 只看該作者
本帖需要重新編輯補全電路原理圖,源碼,詳細說明與圖片即可獲得100+黑幣(帖子下方有編輯按鈕)
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表