Manual
www.nexusrobot.com Robot Kits manual 
  123
 analogWrite(MOTOR1_E,48); 
 analogWrite(MOTOR2_E,32); 
 analogWrite(MOTOR3_E,64); 
} 
//************************************************// 
void turnLeft(){ 
 analogWrite(MOTOR1_E,36); //Revese 
 analogWrite(MOTOR2_E,53); //forward 
 analogWrite(MOTOR3_E,53); //forward 
} 
void turnRight(){ 
 analogWrite(MOTOR1_E,66); //forward 
 analogWrite(MOTOR2_E,40); //Revese 
 analogWrite(MOTOR3_E,40); //Revese 
} 
//************************************************// 
void RotateRight(){ 
 analogWrite(MOTOR1_E,66); //forward 
 analogWrite(MOTOR2_E,62); //forward 
 analogWrite(MOTOR3_E,64); //forward 
} 
//*************************************************// 
void RotateLeft(){ 
 analogWrite(MOTOR1_E,36); //Revese 
 analogWrite(MOTOR2_E,32); //Revese 
 analogWrite(MOTOR3_E,34); //Revese 
} 
//**************************************************// 
void judge(){ 
 if(distBuf[0]>=30){ 
 if(distBuf[1]<=10 && distBuf[2]>10) turnRight(); 
 else if(distBuf[2]<=10 && distBuf[1]>10) turnLeft(); 
 else if(distBuf[1]<=10 && distBuf[2]<=10) RotateLeft(); 
 else goAhead(); 
 }else RotateLeft(); 
} 
//**************************************************// 
void allStop(){ 










