0% found this document useful (0 votes)
49 views5 pages

Program: Setup

A program is a set of commands that tells the robot what to do. It must be downloaded (downloaded) to the robot before it can be run. This is the program you will download onto the VEX Micro Controller.

Uploaded by

a9841140155
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views5 pages

Program: Setup

A program is a set of commands that tells the robot what to do. It must be downloaded (downloaded) to the robot before it can be run. This is the program you will download onto the VEX Micro Controller.

Uploaded by

a9841140155
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

ROBOTC

Setup

Download Program
In this lesson, you will learn how to download and run a program on the robot. For now, a sample program included with ROBOTC will be used in place of one you have written. Your robot is ready to go! The next step is for you to tell it what to do by sending it a program. A program is a set of commands that tells the robot what to do and how to react to its environment. Once written, a program must be transferred (downloaded) to the robot before it can be run. This is the program you will download onto the VEX Micro Controller.
1 2 3 4 5

task main() { motor[port3] = 127; wait1Msec(3000); }

1.. Normally, you would type this program directly into ROBOTC. For your convenience, however, there is an already-completed copy provided in the Sample Programs folder. Follow the steps below to open this program.

1a. Open Sample Program Select File > Open Sample Program to find the saved program.

1b. Select Training Samples Open the Training Samples folder to find the Motor Port 3 Forward program. 1c. Select the program Select the Motor Port 3 Forward program from the Training Samples Folder.

1d. Open the program Click Open to open the Motor Port 3 Forward program.

2007 Carnegie Mellon Robotics Academy / For use with VEX Robotics Systems

Download Program 1

ROBOTC

Setup

Download Program (cont.)


Checkpoint The program should appear in the right-hand pane of the window.

2.. Download the program to the robot. First, restart the VEX Micro Controller. Then, go to the Robot menu and choose either the Download Program or Compile and Download Program command.

2a. Turn the VEX Micro Controller on Make sure the VEX Micro Controller has its power switch in the ON position.

2b. Compile and Download Select Robot > Download Program or Compile and Download Program to download the Motor Port 3 Forward program to the VEX Micro Controller.

2007 Carnegie Mellon Robotics Academy / For use with VEX Robotics Systems

Download Program 2

ROBOTC

Setup

Download Program (cont.)


Checkpoint The ROBOTC debug windows appear when the download is complete. Sometimes only the Program Debug window will appear. This is not a problem, simply a setting in ROBOTC.

If an Error Appears...

If you get an error like the one shown above (possibly with a different message) when you are trying to download the program, you may not have set up your robot properly. Check the following things: Are the cables connected to your robot correctly? Is the robot turned on? Are the correct platform type and COM port selected under View > Preferences?

2007 Carnegie Mellon Robotics Academy / For use with VEX Robotics Systems

Download Program 3

ROBOTC

Setup

Download Program (cont.)


3.. Place the robot on an open area on the floor or table. In the Program Debug window, click the button labeled Start.

3a. Place robot Place the robot in an open area on the floor or table, with the cable connected.

3b. Click Start Click the Start button to run the Motor Port 3 Forward program.

Checkpoint The program you just downloaded told the robot to run one of the motors for three seconds. When run, the program causes the robot to move in a circle, performing a swing turn.

2007 Carnegie Mellon Robotics Academy / For use with VEX Robotics Systems

Download Program 4

ROBOTC

Setup

Download Program (cont.)


End of Section Congratulations! You have just downloaded and run your first ROBOTC program. The Motor Port 3 Forward program sent a command to the robot to turn on the motor attached to Port 3 and run it for 3000 milliseconds (or 3 seconds). This caused the robot to execute a swing turn. In the next lesson, you will learn how to modify the program to make the robot travel forward. But first, lets spend some time learning the basic concepts behind ROBOTC and programming in the Fundamentals section.

2007 Carnegie Mellon Robotics Academy / For use with VEX Robotics Systems

Download Program 5

You might also like