Hi! We’re a new team and this is our third competition so far. We’ve developed our robot and had a really nice conveyor belt going but it was too heavy, so we switched to the claw. Since we have an eight bar design, we attached axles and mounted the claw in there. Unfortunately, the claw doesn’t seem to stay idle when we don’t press the trigger. We suspect that it’s a problem with the program. Any ideas?
task usercontrol()
{
while (true)
{
motor[flm] = vexRT[Ch3];
motor[blm] = vexRT[Ch3];
motor[frm] = vexRT[Ch2];
motor[brm] = vexRT[Ch2];
if(vexRT[Btn6U] == 1)
{
motor[liftright] = 127;
motor[liftleft] = 127;
motor[liftright2] = 127;
motor[liftleft2] = 127;
}
else
{
motor[liftright] = 0;
motor[liftleft] = 0;
motor[liftright2] = 0;
motor[liftleft2] = 0;
}
if(vexRT[Btn5U] == 1)
{
motor[liftleft] = -30;
motor[liftright] = -30;
motor[liftleft2] = -30;
motor[liftright2] = -30;
}
else
{
motor[liftright] = 0;
motor[liftleft] = 0;
motor[liftright2] = 0;
motor[liftleft2] = 0;
}
if(vexRT[Btn5D] == 1)
{
motor[claw] = 127;
}
else
{
motor[claw] = 0;
}
if(vexRT[Btn6D] == 1)
{
motor[claw] = -127;
}
else
{
motor[claw] = 0;
}
if(vexRT[Btn8D] == 1)
{
motor[elbow] = 70;
}
else
{
motor[elbow] = -5;
}
if(vexRT[Btn8U] == 1)
{
motor[elbow] = -110;
}
else
{
motor[elbow] = -5;
}
}
}