基于C语言的避障小车程序
因为最近在做一些小项目,我就把我写的程序分享给大家,一起学习
#include<reg52.h>
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
sbit Trig=P3^0;
sbit Echo=P3^3;
sbit control=P3^5;
uint
dis,flag=0,timeH,timeL,succeed_flag,time;
void tran_ret();
void delay_nus(uint n);
void delay_ms(long int m);
void delay_n100us(uint n);
void run();
//void backrun();
//void freestop();
void turnleft();
void turnright ();
void Sturnround();
void Nturnround();
void servo_turn(int gao);
//**********************************************************************
//主函数
<