My students are trying to code their robot for our class competition, but we can’t get the arm to move at all. The wheels are working just fine, but the motors for the arm aren’t even responding. Their robot is based on a basic clawbot design, but there is an extra joint between the arm and the chassis. I’m new to teaching PLTW (just this semester), and I’m struggling to help them with this code. Can someone tell me where we might have gone wrong?
#pragma config(Motor, port2, RR, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port3, LR, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port4, RF, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port5, LF, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port6, Claw, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port7, Arm2, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port8, Arm1, tmotorVex393_MC29, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//
task main()
{
while(1==1)
{
motor(RF)=vexRT(Ch2);
motor(RR)=vexRT(Ch2);
motor(LF)=vexRT(Ch3);
motor(LR)=vexRT(Ch3);
}
wait(0.01);
if(vexRT(Btn8U) == 1)
{
motor(Arm1) = 100;
wait(0.01);
}
if(vexRT(Btn8D) == 1)
{
motor(Arm1) = -100;
wait(0.01);
}
if(vexRT(Btn7U) == 1)
{
motor(Claw) = 100;
wait(0.01);
}
if(vexRT(Btn7D) == 1)
{
motor(Claw) = -100;
wait(0.01);
}
else
motor(Arm2) = 0;
motor(Arm1) = 0;
motor(Claw) = 0;
}