標(biāo)題:
基于STM32的智能避障程序
[打印本頁(yè)]
作者:
2225384891
時(shí)間:
2019-3-5 11:11
標(biāo)題:
基于STM32的智能避障程序
基于STM32的智能避障程序
單片機(jī)源程序如下:
#include "stm32f10x.h"
#include "delay.h"
#include "motor.h"
#include "keysacn.h"
#include "IRAvoid.h"
#include <exti.h>
/*
void ZYSTM32_run(int speed,int time); //前進(jìn)函數(shù)
void ZYSTM32_brake(int time); //剎車函數(shù)
void ZYSTM32_Left(int speed,int time); //左轉(zhuǎn)函數(shù)
void ZYSTM32_Spin_Left(int speed,int time); //左旋轉(zhuǎn)函數(shù)
void ZYSTM32_Right(int speed,int time); //右轉(zhuǎn)函數(shù)
void ZYSTM32_Spin_Right(int speed,int time);//右旋轉(zhuǎn)函數(shù)
void ZYSTM32_back(int speed,int time); //后退函數(shù)
*/
int main(void)
{
delay_init();
KEY_Init();
IRAvoidInit();
TIM4_PWM_Init(7199,0); //初始化PWM
ZYSTM32_brake(500);
keysacn();
while(1)
{
GPIO_ResetBits(GPIOA,GPIO_Pin_4);
GPIO_SetBits(GPIOB,GPIO_Pin_9);
}
}
復(fù)制代碼
所有資料51hei提供下載:
智能小車紅外避障實(shí)驗(yàn)(帶后退掉頭避障).7z
(191.31 KB, 下載次數(shù): 13)
2019-3-6 02:20 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
作者:
admin
時(shí)間:
2019-3-6 02:20
本帖需要重新編輯補(bǔ)全電路原理圖,源碼,詳細(xì)說(shuō)明與圖片即可獲得100+黑幣(帖子下方有編輯按鈕)
歡迎光臨 (http://www.torrancerestoration.com/bbs/)
Powered by Discuz! X3.1