VEX EDR Cortex - only one port will run at a time

Hi Folks,
First time posting here. A bit frustrated with EDR cortexes.
I am running into a problem with multiple cortexes.

I am having students write a basic program to see what ports are working. They start with setting up a single motor and then test it across the ports, changing the motor set up to reflect the port they’er testing.

The problem arises when students try to test two motors. We are using code as below:

#pragma config(Motor, port2, RightMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port4, LeftMotor, tmotorVex393_MC29, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

task main()
{
while (1==1)

Motor [LeftMotor] = 127;
Motor [RightMotor] = 127;

}

Whats happening is that ports that did work when only one motor was set up will no longer respond when there are two motors set up. Say port 3 worked when there was only one motor set up, when two motors are set up, to say port 2 and 3 both stop working. I am unsure where to go next?

This seems to be occuring across all of the ports? and on multiple cortex…

Has anyone seen this before? Have a solution…?

Thanks a million in advance…

task main()
{
while (1==1) {

          Motor [LeftMotor] = 127;
          Motor [RightMotor] = 127;
      }
}

You are missing the { after the while statement. So you code says Forever make the left motor spin. I fixed is as shown above.

4 Likes