When I turn on my robot and my controller, the controllers LED’s are off, except VexNet, which is on, and blinks twice every half second, on the robot, VexNet and Game are blinking yellow rapidly, and Robot, which blinks once every half second. Our Controller and robot were connecting just fine earlier today,. The only thing that has happened since Is I have added coding for a partner joystick. ever since then, the robot is not connecting to the controller.
Code
task main ()
{
int joy_x;
int joy_y;
int threshold = 10;
while(1 == 1)
{
joy_x = vexRT[Ch4]; .
joy_y = vexRT[Ch3];
if((abs(joy_x) > threshold) && (abs(joy_y) > threshold) && (joy_y > 0))
{
motor[backLeftMotor] = (joy_y + joy_x)/2;
motor[backRightMotor] = (joy_y - joy_x)/2;
}
else if((abs(joy_x) > threshold) && (abs(joy_y) > threshold) && (joy_y < 0))
{
motor[backLeftMotor] = (joy_y - joy_x)/2;
motor[backRightMotor] = (joy_y + joy_x)/2;
}
else if((abs(joy_x) > threshold) && (abs(joy_y) < threshold))
{
motor[backLeftMotor] = joy_x;
motor[backRightMotor] = (-1 * joy_x);
}
// Standing still: (both abs(X) and abs(Y) are below the threshold)
else
{
motor[backLeftMotor] = 0;
motor[backRightMotor] = 0;
}
{
motor[armLeftMotor] = vexRT[Ch2Xmtr2];
motor[armRightMotor] = vexRT[Ch2Xmtr2];
}
{
motor[intakeLeftMotor] = vexRT[Ch3Xmtr2];
motor[intakeRightMotor] = vexRT[Ch3Xmtr2];
}
}
}
Please help, as we have a competition on Saturday!
-The 9290D team