请问这个错误什么意思

int Front_Distance = 0;//
int Left_Distance = 0;
int Right_Distance = 0;
//舵机
#include <Servo.h>
Servo myservo;
int pos = 90;
int myangle;//定义角度变量
int pulsewidth;//定义脉宽变量
int val;
//驱动
int rightgo=6,leftgo=10;
int rightback=9,leftback=11;
//超声波
const int TrigPin=2;
const int EchoPin=3;
float distance;
void setup() {
//舵机引脚
myservo.attach(12);
//驱动
pinMode(rightgo,OUTPUT);
pinMode(leftgo,OUTPUT);
pinMode(rightback,OUTPUT);
pinMode(leftback,OUTPUT);
//超声
pinMode(TrigPin,OUTPUT);
pinMode(EchoPin,INPUT);
Serial.begin(9600);
}
void stop(int time) { //小车停止
digitalWrite(rightgo, LOW);
digitalWrite(rightback, LOW);
digitalWrite(leftgo, LOW);
digitalWrite(leftback, LOW);
Serial.println("stop!");
delay(time * 100);//执行时间,可以调整
}
void go(int time)
{
digitalWrite(rightgo,HIGH);
digitalWrite(rightback, LOW);
digitalWrite(leftgo,HIGH);
digitalWrite(leftback, LOW);
Serial.println("go!");
delay(time * 100);//执行时间,可以调整
}
void back(int time)
{
digitalWrite(rightback,HIGH);
digitalWrite(leftback,HIGH);
digitalWrite(rightgo,LOW);
digitalWrite(leftgo,LOW);
Serial.println("back!");
delay(time * 100);//执行时间,可以调整
}
void right(int time)
{
digitalWrite(leftgo,HIGH);
digitalWrite(leftback,LOW);
digitalWrite(rightback,HIGH);
digitalWrite(rightgo,LOW);
Serial.println("right!");
delay(time * 100);//执行时间,可以调整
}
void left(int time)
{
digitalWrite(leftback,HIGH);
digitalWrite(leftgo,LOW);
digitalWrite(rightgo,HIGH);
digitalWrite(rightback,LOW);
Serial.println("left!");
delay(time * 100);//执行时间,可以调整
}
void spin_left(int time) //左转(左轮后退,右轮前进)
{
digitalWrite(rightgo,HIGH); // 右电机前进
digitalWrite(rightback,LOW);
analogWrite(rightgo,200);
analogWrite(rightback,0);//PWM比例0~255调速
digitalWrite(leftgo,HIGH); //左轮后退
digitalWrite(leftback,LOW);
analogWrite(leftgo,200);
analogWrite(leftback,0);//PWM比例0~255调速
delay(time * 100); //执行时间,可以调整
}
int dis()
{
digitalWrite(TrigPin, LOW); // 给触发脚低电平2μs
delayMicroseconds(2);
digitalWrite(TrigPin, HIGH); // 给触发脚高电平10μs,这里至少是10μs
delayMicroseconds(10);
digitalWrite(TrigPin, LOW); // 持续给触发脚低电
float distance = pulseIn(EchoPin, HIGH); // 读取高电平时间(单位:微秒)
distance= distance/58; //为什么除以58等于厘米, Y米=(X秒*344)/2
// X秒=( 2*Y米)/344 ==》X秒=0.0058*Y米 ==》厘米=微秒/58
//Serial.print("Distance:"); //输出距离(单位:厘米)
//Serial.println(distance); //显示距离
//Distance = distance;
return distance;
}
void front_detection()
{
//此处循环次数减少,为了增加小车遇到障碍物的反应速度
for(int i=0;i<=5;i++) //产生PWM个数,等效延时以保证能转到响应角度
{
servopulse(myservo,90); //模拟产生PWM
}
Front_Distance = dis();
//Serial.print("Front_Distance:"); //输出距离(单位:厘米)
// Serial.println(Front_Distance); //显示距离
//Distance_display(Front_Distance);
}
void servopulse(int myserve,int myangle)/*定义一个脉冲函数,用来模拟方式产生PWM值舵机的范围是0.5MS到2.5MS 1.5MS 占空比是居中周期是20MS*/
{
pulsewidth=(myangle*11)+500;//将角度转化为500-2480 的脉宽值 这里的myangle就是0-180度 所以180*11+50=2480 11是为了换成90度的时候基本就是1.5MS
digitalWrite(myservo,HIGH);//将舵机接口电平置高 90*11+50=1490uS 就是1.5ms
delayMicroseconds(pulsewidth);//延时脉宽值的微秒数 这里调用的是微秒延时函数
digitalWrite(myservo,LOW);//将舵机接口电平置低
delay(20-(pulsewidth*0.001));//延时周期内剩余时间 这里调用的是ms延时函数
}
void left_detection()
{
for(int i=0;i<=15;i++) //产生PWM个数,等效延时以保证能转到响应角度
{
servopulse(myservo,175);//模拟产生PWM
}
Left_Distance = dis();
//Serial.print("Left_Distance:"); //输出距离(单位:厘米)
//Serial.println(Left_Distance); //显示距离
}
void right_detection()
{
for(int i=0;i<=15;i++) //产生PWM个数,等效延时以保证能转到响应角度
{
servopulse(myservo,5);//模拟产生PWM
}
Right_Distance = dis();
//Serial.print("Right_Distance:"); //输出距离(单位:厘米)
//Serial.println(Right_Distance); //显示距离
}
void autom()
{
while(1)
{
front_detection();//测量前方距离
if(Front_Distance < 30)//当遇到障碍物时
{
stop(2);//先刹车
back(2);//后退减速
stop(2);//停下来做测距
left_detection();//测量左边距障碍物距离
right_detection();//测量右边距障碍物距离
if((Left_Distance < 30 ) &&( Right_Distance < 30 ))//当左右两侧均有障碍物靠得比较近
spin_left(0.7);//旋转掉头
else if(Left_Distance > Right_Distance){left(3);stop(1);}
else{right(3);stop(1);}
}
else go(); //无障碍物,直行
}
}
void loop()
{
while(Serial.available())
{
char c=Serial.read();
if(c=='G') go(1);
else if(c=='B') back(1);
else if(c=='R') right(1);
else if(c=='L') left(1);
else if(c=='S') stop(1);
else if(c=='A') autom();
}
}

int Front_Distance = 0;//
int Left_Distance = 0;
int Right_Distance = 0;
//舵机
#include <Servo.h>
Servo myservo;
int pos = 90;
int myangle;//定义角度变量
int pulsewidth;//定义脉宽变量
int val;
//驱动
int rightgo=6,leftgo=10;
int rightback=9,leftback=11;
//超声波
const int TrigPin=2;
const int EchoPin=3;
float distance;
void setup() {
//舵机引脚
myservo.attach(12);
//驱动
pinMode(rightgo,OUTPUT);
pinMode(leftgo,OUTPUT);
pinMode(rightback,OUTPUT);
pinMode(leftback,OUTPUT);
//超声
pinMode(TrigPin,OUTPUT);
pinMode(EchoPin,INPUT);
Serial.begin(9600);
}
void stop(int time) { //小车停止
digitalWrite(rightgo, LOW);
digitalWrite(rightback, LOW);
digitalWrite(leftgo, LOW);
digitalWrite(leftback, LOW);
Serial.println("stop!");
delay(time * 100);//执行时间,可以调整
}
void go(int time)
{
digitalWrite(rightgo,HIGH);
digitalWrite(rightback, LOW);
digitalWrite(leftgo,HIGH);
digitalWrite(leftback, LOW);
Serial.println("go!");
delay(time * 100);//执行时间,可以调整
}
void back(int time)
{
digitalWrite(rightback,HIGH);
digitalWrite(leftback,HIGH);
digitalWrite(rightgo,LOW);
digitalWrite(leftgo,LOW);
Serial.println("back!");
delay(time * 100);//执行时间,可以调整
}
void right(int time)
{
digitalWrite(leftgo,HIGH);
digitalWrite(leftback,LOW);
digitalWrite(rightback,HIGH);
digitalWrite(rightgo,LOW);
Serial.println("right!");
delay(time * 100);//执行时间,可以调整
}
void left(int time)
{
digitalWrite(leftback,HIGH);
digitalWrite(leftgo,LOW);
digitalWrite(rightgo,HIGH);
digitalWrite(rightback,LOW);
Serial.println("left!");
delay(time * 100);//执行时间,可以调整
}
void spin_left(int time) //左转(左轮后退,右轮前进)
{
digitalWrite(rightgo,HIGH); // 右电机前进
digitalWrite(rightback,LOW);
analogWrite(rightgo,200);
analogWrite(rightback,0);//PWM比例0~255调速
digitalWrite(leftgo,HIGH); //左轮后退
digitalWrite(leftback,LOW);
analogWrite(leftgo,200);
analogWrite(leftback,0);//PWM比例0~255调速
delay(time * 100); //执行时间,可以调整
}
int dis()
{
digitalWrite(TrigPin, LOW); // 给触发脚低电平2μs
delayMicroseconds(2);
digitalWrite(TrigPin, HIGH); // 给触发脚高电平10μs,这里至少是10μs
delayMicroseconds(10);
digitalWrite(TrigPin, LOW); // 持续给触发脚低电
float distance = pulseIn(EchoPin, HIGH); // 读取高电平时间(单位:微秒)
distance= distance/58; //为什么除以58等于厘米, Y米=(X秒*344)/2
// X秒=( 2*Y米)/344 ==》X秒=0.0058*Y米 ==》厘米=微秒/58
//Serial.print("Distance:"); //输出距离(单位:厘米)
//Serial.println(distance); //显示距离
//Distance = distance;
return distance;
}
void front_detection()
{
//此处循环次数减少,为了增加小车遇到障碍物的反应速度
for(int i=0;i<=5;i++) //产生PWM个数,等效延时以保证能转到响应角度
{
servopulse(myservo,90); //模拟产生PWM
}
Front_Distance = dis();
//Serial.print("Front_Distance:"); //输出距离(单位:厘米)
// Serial.println(Front_Distance); //显示距离
//Distance_display(Front_Distance);
}
void servopulse(int myserve,int myangle)/*定义一个脉冲函数,用来模拟方式产生PWM值舵机的范围是0.5MS到2.5MS 1.5MS 占空比是居中周期是20MS*/
{
pulsewidth=(myangle*11)+500;//将角度转化为500-2480 的脉宽值 这里的myangle就是0-180度 所以180*11+50=2480 11是为了换成90度的时候基本就是1.5MS
digitalWrite(myservo,HIGH);//将舵机接口电平置高 90*11+50=1490uS 就是1.5ms
delayMicroseconds(pulsewidth);//延时脉宽值的微秒数 这里调用的是微秒延时函数
digitalWrite(myservo,LOW);//将舵机接口电平置低
delay(20-(pulsewidth*0.001));//延时周期内剩余时间 这里调用的是ms延时函数
}
void left_detection()
{
for(int i=0;i<=15;i++) //产生PWM个数,等效延时以保证能转到响应角度
{
servopulse(myservo,175);//模拟产生PWM
}
Left_Distance = dis();
//Serial.print("Left_Distance:"); //输出距离(单位:厘米)
//Serial.println(Left_Distance); //显示距离
}
void right_detection()
{
for(int i=0;i<=15;i++) //产生PWM个数,等效延时以保证能转到响应角度
{
servopulse(myservo,5);//模拟产生PWM
}
Right_Distance = dis();
//Serial.print("Right_Distance:"); //输出距离(单位:厘米)
//Serial.println(Right_Distance); //显示距离
}
void autom()
{
while(1)
{
front_detection();//测量前方距离
if(Front_Distance < 30)//当遇到障碍物时
{
stop(2);//先刹车
back(2);//后退减速
stop(2);//停下来做测距
left_detection();//测量左边距障碍物距离
right_detection();//测量右边距障碍物距离
if((Left_Distance < 30 ) &&( Right_Distance < 30 ))//当左右两侧均有障碍物靠得比较近
spin_left(0.7);//旋转掉头
else if(Left_Distance > Right_Distance){left(3);stop(1);}
else{right(3);stop(1);}
}
else go(); //无障碍物,直行
}
}
void loop()
{
while(Serial.available())
{
char c=Serial.read();
if(c=='G') go(1);
else if(c=='B') back(1);
else if(c=='R') right(1);
else if(c=='L') left(1);
else if(c=='S') stop(1);
else if(c=='A') autom();
}
}


