标题:
基于STM32的智能避障程序
[打印本页]
作者:
2225384891
时间:
2019-3-5 11:11
标题:
基于STM32的智能避障程序
基于STM32的智能避障程序
单片机源程序如下:
#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); //前进函数
void ZYSTM32_brake(int time); //刹车函数
void ZYSTM32_Left(int speed,int time); //左转函数
void ZYSTM32_Spin_Left(int speed,int time); //左旋转函数
void ZYSTM32_Right(int speed,int time); //右转函数
void ZYSTM32_Spin_Right(int speed,int time);//右旋转函数
void ZYSTM32_back(int speed,int time); //后退函数
*/
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);
}
}
复制代码
所有资料51hei提供下载:
智能小车红外避障实验(带后退掉头避障).7z
(191.31 KB, 下载次数: 13)
2019-3-6 02:20 上传
点击文件名下载附件
下载积分: 黑币 -5
作者:
admin
时间:
2019-3-6 02:20
本帖需要重新编辑补全电路原理图,源码,详细说明与图片即可获得100+黑币(帖子下方有编辑按钮)
欢迎光临 (http://www.51hei.com/bbs/)
Powered by Discuz! X3.1