Robot Help Please

My robot is not responding to my code. It runs on its own the second we turn in the cortex, even before we plug in the remote. I have synced the firmware for both and nothing seems to work. HELP PLEASE!:confused:

could you post your code so we may try to identify any potential problems within it?

task main()
while(1 == 1)

motor[frontRightMotor] = vexRT[Ch2];
motor[backRightMotor]  = vexRT[Ch2];

motor[frontLeftMotor] = vexRT[Ch3];
motor[backLeftMotor]  = vexRT[Ch3];



You probably need some Motor Controller 29s on your motors. They are required on ports 2-9 and if you plug motors in directly, the motors will spin by themselves without any input.

They are sold at

I have Motor Controllers on all of my motors.

Can you check all your cables for faults/issues? Can you try another cortex?

This is my second Cortex. The first one had the same problem.

What exactly do you mean it “runs on its own” after you turn it on? Do you mean the motors start running without being given any commands?

When you downloaded your code to the Cortex, did you get any strange messages? error messages, etc?

Have you tried downloading some dummy code to the Cortex (code that does nothing, code that commands no motors to run) to see what happens?

Sometimes this sort of thing happens if you still have some old code on the Cortex (which somebody else put there) that you were not able to successfully overwrite. Are you sure you are getting your new code into the Cortex?

For sure, do what FullMetalMentor suggested, and make sure your code is downloading correctly. If you’re using the wireless download, try using the USB A-A cable. Also, when you run the program, are the cortex and controller connected properly, what are the lights on them showing?

Also, sometimes it’s a possibility that there is something lurking in your code causing it not work properly, could you post your entire code top to bottom (including the pragmas, etc.)? To make it easier to read, please use the code tags around the code, when you are posting a reply (only in the advanced/normal mode, not in quick reply), click the button at the top that looks like a #.