ROBOTC Program downloads without errors but does not run, the motors turn on and run continuously. The program is shown running but starts at the last line (stop motor) but never stops. I have all the updated firmware and have ran debugging. When I run it line by line the program does not work even when it gets to stop motor. Any suggestions? Once I get this to work how can I activate the program once its disconnected from the USB?
Are you planning to run standalone or with a joystick (ie. using VEXnet keys) ? Make sure the download mode is set appropriately.
( and startMotor should be setMotor )
I want to run a car stand alone without a joystick. I’m using Natural Language for the code. For starting the motor that is the only choice. There is a set servo but setMotor is not an option that I have used before.
Ok, we used to call it startMotor so perhaps you are using an earlier version of ROBOTC (or using the PLTW version), it doesn’t matter. So to run the cortex without a joystick make sure you download as “USB Only”. Which motors are you using? If they are two wire motors make sure you have the motor controller MC29 correctly installed between the cortex and motor.
I am using the PLTW version and the two wire motor, 393. I have the connection set for USB only. My controller firmware is updated. I successfully downloaded the same program but the motor started running before starting the program. When I “started” the program it jumped down to the stop line but did not stop. Step by step did not do anything either but the lines were now highlighted in yellow if that means anything.
It looks like you have the motor in motor port 4. Do you have a motor controller between the Cortex and the motor? Otherwise, you can plug the 2-wire motor directly into either ports 1 or 10, without a motor controller.