void usercontrol( void ) {
// User control code here, inside the loop
while(true) {
LeftFront.spin(vex::directionType::rev, Controller1.Axis3.value(), vex::velocityUnits::pct); //(Axis3+Axis4)/2
RightFront.spin(vex::directionType::fwd, Controller1.Axis2.value(), vex::velocityUnits::pct);//(Axis3-Axis4)/2
vex::task::sleep(20);
}
//Use these variables to set the speed of the arm and claw.
int armSpeedPCT = 100;
int clawSpeedPCT = 100;
while(true) {
if(Controller1.ButtonL1.pressing()) {
Arm.spin(directionType::fwd, armSpeedPCT, velocityUnits::pct);
}
else if(Controller1.ButtonL2.pressing()) {
Arm.spin(directionType::rev, armSpeedPCT, velocityUnits::pct);
}
else {
Arm.stop(brakeType::brake);
}
if(Controller1.ButtonR1.pressing()) {
Claw.spin(directionType::fwd, clawSpeedPCT, velocityUnits::pct);
}
else if(Controller1.ButtonR2.pressing()) {
Claw.spin(directionType::rev, clawSpeedPCT, velocityUnits::pct);
}
else {
Claw.stop(brakeType::brake);
}
if(Controller1.ButtonL1.pressing()) {
Arm1.spin(directionType::fwd, armSpeedPCT, velocityUnits::pct);
}
else if(Controller1.ButtonL2.pressing()) {
Arm1.spin(directionType::rev, armSpeedPCT, velocityUnits::pct);
}
else {
Arm1.stop(brakeType::brake);
}
if(Controller1.ButtonR1.pressing()) {
Claw1.spin(directionType::fwd, clawSpeedPCT, velocityUnits::pct);
}
else if(Controller1.ButtonR2.pressing()) {
Claw1.spin(directionType::rev, clawSpeedPCT, velocityUnits::pct);
}
else {
Claw1.stop(brakeType::brake);
}
task::sleep(20);
}
}
Our arm and claw wouldn’t move