My robot was working just fine until I tried downloading the code to the microcontroller a few days ago. Then, every time the microcontroller was not connected via cable to my laptop or joystick, all the motors would spin endlessly. Somehow, it stopped and now the microcontroller does absolutely nothing when I use my joystick. Can someone please help??? Here’s my code:
task main()
{
while(1==1)
{
motor[Leftmotor1] = vexRT[Ch3]/2;
motor[Leftmotor2] = vexRT[Ch3]/2;
motor[Rightmotor1] = vexRT[Ch2];
motor[Rightmotor2] = vexRT[Ch2];
if(vexRT[Btn6U] == 1)
{
motor[Clawmotor1] = 127;
motor[Clawmotor2] = 127;
}
else if (vexRT[Btn6D] == 1)
{
motor[Clawmotor1] = -127;
motor[Clawmotor2] = -127;
}
else
{
motor[Clawmotor1] = 0;
motor[Clawmotor2] = 0;
}
}
}