Here you can name each of your motors according to their function and you can identify them as motors to ROBOTC (make sure that the port# indicated is the same as the one on your VEX cortex).
You should see a new window open that looks similar to the one below. While you could type out a #pragma lines for every motor, it is much easier to go the Robot menu and select "Motors and Sensors Setup". A #pragma line typically looks like this: #pragma config(Sensor, Port#, Name, SensorType, openLoop). In ROBOTC, this is accomplished by using the #pragma lines at the very beginning of the document. Before we can even start writing drive code, we need to identify all of our motors and distinguish one from another. Motors are a very important part of any robot; they allow us to drive, intake, lift, etc. Once you have your blank Competition Template, you are ready to get started. We will look at each of these sections in detail later. As you can see in the image below, ROBOTC will automatically write #pragma and #include lines for you and then create three sections for pre_auton, autonomous, and usercontrol. The Competition Template is a template for how you must structure your code for participation in VEX competitions. When you click on File and look under New you will see an option for "Competition Template". The first thing you will want to do when you open ROBOTC is make a new document.
This guide to ROBOTC focuses on version 3.05 of ROBOTC for Cortex and PIC and we use a VEX Cortex and a VEXnet Joystick controller.
Knowing how to program in ROBOTC is essential for participating in VEX Robotics Competitions. ROBOTC is a CÂbased programming language that is used to create and execute programs for VEX and Lego Mindstorms.