task main()
{
while(1==1)
{
motor(backleft) = vexRT[Ch2];
motor(backright) = vexRT[Ch2];
motor(frontleft) = vexRT[Ch3];
motor(frontright) = vexRT[Ch3];
}
if(vexRT[Btn8D] == 1)
{
motor(claw) = -127;
}
else if (vexRT[Btn8D] == 1)
{
motor(claw) = -127;
}
else
{
motor(claw) = 0;
}
if(vexRT[Btn8U] == 1)
{
motor(claw) = 127;
}
else if (vexRT[Btn8U] == 1)
{
motor(claw) = 127;
}
else
{
motor(claw) = 1;
}
{
startMotor(frontleft, 127);
startMotor(backleft, -127);
startMotor(frontright, 127);
startMotor(backright, -127);
}
}
that is my code ^
The problem is that when I link up a controller it will work for a few seconds and then stop and then repeat the process until i stop.
I have tried using my friends controller to make sure it isnt the controller that is the problem. It seems to be the code.