Nexus Automation Nexus Robot User Manual page 127

Kits
Table of Contents

Advertisement

www.nexusrobot.com
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);
analogWrite(MOTOR2_E,40);
analogWrite(MOTOR3_E,40);
}
//************************************************//
void RotateRight(){
analogWrite(MOTOR1_E,66); //forward
analogWrite(MOTOR2_E,62); //forward
analogWrite(MOTOR3_E,64); //forward
}
//*************************************************//
void RotateLeft(){
analogWrite(MOTOR1_E,36);
analogWrite(MOTOR2_E,32);
analogWrite(MOTOR3_E,34);
}
//**************************************************//
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(){
//forward
//Revese
//Revese
//Revese
//Revese
//Revese
Robot Kits manual
123

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Nexus Robot and is the answer not in the manual?

Questions and answers

Table of Contents