/*程序的开头要描述你的设备2
再来要说是脽写的日期版本3
然后碰到问题一次一次都要写清楚4
马达几个驱动电路都要描述5
#include11
intpinLB=6;//定义8脚位左后12
intpinLF=9;//定义9脚位左前13
intpinRB=10;//定义10脚位右后15
intpinRF=11;//定义11脚位右前16
intinputPin=A0;//定义超音波信号接收脚位18
intoutputPin=A1;//定义超音波信号发射脚位19
intFspeedd=0;//前速21
intRspeedd=0;//右速22
intLspeedd=0;//左速23
intdirectionn=0;//前=8后=2左=4右=624
Servomyservo;//设myservo25
intdelay_time=250;//伺服马达转向后的稳定时间26
intFgo=8;//前进28
intRgo=6;//右转29
intLgo=4;//左转30
intBgo=2;//倒车31
voidsetup()33
Serial
begin(9600);//定义马达输出脚位35
pinMode(pinLB,OUTPUT);//脚位8(PWM)36
pinMode(pinLF,OUTPUT);//脚位9(PWM)37
pinMode(pinRB,OUTPUT);//脚位10(PWM)38
pinMode(pinRF,OUTPUT);//脚位11(PWM)39
pinMode(inputPin,INPUT);//定义超音波输入脚位41
pinMode(outputPin,OUTPUT);//定义超音波输出脚位42
myservo
attach(5);//定义伺服马达输出第5脚位(