Joystick Channel Not Working

Hello all,

I am trying to program a car with two motors to have the left motor run on channel 3 and the right to run on channel 2 of the VEXnet joystick. My code looks like this:

#pragma config(Motor, port4, leftmoto, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port6, rightmoto, tmotorVex393_MC29, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

task main()
{
while(1==1)
motor(port6)=vexRT(Ch2);
motor(port4)=vexRT(Ch3);

}

I can get channel 2 to work, but not channel 3. I have tested the motors and motor controllers and they all function. What am I doing wrong?

uses brackets on your while loop
task main()
{
while(1==1){
motor(port6)=vexRT(Ch2);
motor(port4)=vexRT(Ch3);
}
}

1 Like

I can’t believe I missed that. Thanks!