I’m brand new to Vex Robotics and had a few questions regarding the Vex EDR platform.
In RobotC for Vex, I selected the Vex Cortex 2.0 environment to use with my Vex EDR. I’ve seen some videos where they select the Natural Environment. What is the difference and which one should I be using?
So far, I’ve been using the motor]= and wait1Msec() commands to get the robot to move in autonomous mode. I see videos where people use startMotor], stopMotor], and wait() commands. What is the difference and which ones should I be using with my platform?
I’ve been able to download and compile a program into my robot and get the robot to run. However, from then on, every time I turn the Cortex on, it immediately runs the program. I also completely lose communication between the joystick and Cortex after downloading and compiling a program. The only way I have been able to regain control with the joystick is to depress and hold the Config button on the Cortex, and then go through the whole Download Firmware process and then go through the paring process between the joystick and Cortex with a USB cable. Please tell me why this happens every time and what I need to do differently.
Just one question on your answer to 3: How do I escape from stand alone mode?
When downloading a program into the joystick, is a special adapter required to plug the USB into the front of the joystick, instead of the joystick’s USB port? I assume the Vex key needs to remain in the joystick in order to communicate the program to the Cortex in the robot.
I really appreciate any help you could give, thank you!
Natural language enables some additional commands that encompass higher level functionality, for example, “stopAllMotors” and “turnLeft” are natural language functions. These are not part of the core RobotC language and are implemented as C functions that are included with any code that you write. It is personal preference as to whether these are useful to you.
These are more examples of natural language.
motor[port1] = 100; and setMotor( port1, 100 ); are identical in terms of their functionality.
startMotor is again part of natural language, it is only applicable when the PLTW flavor of natural language is selected, we retain this alternative functionality because it is used in some of the curriculum material.
RobotC is able to download code to the cortex that is always run when the cortex is turned on, this is called “stand alone” mode and is useful when using the cortex without the joystick controller. We can also download code that is intended to be run when the cortex is using the VEXnet key and connected wirelessly to the controller, these different situations are selected using the “Robot->Vex cortex communication mode” menu. Setting this to “USB Only” assumes no joystick is used, setting to either “VEXnet or USB” or “competition” will require a VEXnet key to be used with the cortex.
The RobotC code is only downloaded into the cortex (nothing needs to be programmed into the joystick except the VEX system firmware which is a one time only download). Once you have programmed the cortex using the communication mode I described above, you should be able to use the joystick to control the robot.
There is also a programming cable available fro VEX, this allows code to be downloaded via the joystick wirelessly to the cortex.