|
單片機(jī)源程序如下:- #include "stm32f10x.h"
- #include "delay.h"
- #include "motor.h"
- #include "keysacn.h"
- #include "IRSEARCH.h"
- #include "IRAvoid.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();
- IRSearchInit();
- IRAvoidInit();
- TIM4_PWM_Init(7199,0); //初始化PWM
- ZYSTM32_brake(500);
- keysacn();
- while(1)
- {
- AVoidRun(); //避障函數(shù)
- }
- }
復(fù)制代碼
全部資料51hei下載地址:
ZYSTM32-A0 智能小車紅外避障實(shí)驗(yàn)(帶后退掉頭避障).rar
(300.57 KB, 下載次數(shù): 61)
2018-7-16 17:11 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
|
評分
-
查看全部評分
|