前两篇博客中我对红外避障小车进行了组装,本次我为其编写了代码。
#include <REG52.H>
sbit ENA=P0^0;
sbit IN1=P0^1;
sbit IN2=P0^2;
sbit ENB=P2^0;
sbit IN3=P2^1;
sbit IN4=P2^2;
sbit A1=P1^0;
sbit B2=P1^1;
void delay(int z) {
int x,y
前两篇博客中我对红外避障小车进行了组装,本次我为其编写了代码。
#include <REG52.H>
sbit ENA=P0^0;
sbit IN1=P0^1;
sbit IN2=P0^2;
sbit ENB=P2^0;
sbit IN3=P2^1;
sbit IN4=P2^2;
sbit A1=P1^0;
sbit B2=P1^1;
void delay(int z) {
int x,y