Hello, RobotC

I’m going to start a series of posts on RobotC, which is the language we use to program robots for the First Tech Challenge (FTC) robot competition. As a preliminary note, there will be some things I do not cover in this blog mainly because they are particular details of the RobotC IDE (Integrated Development Environment) which we use to compose our programs, specifically all of my example programs on this blog will likely leave out any motor and sensor setup which is not an easy thing to write out from memory, and best done with the help of the RobotC IDE.

Here is an example of a first RobotC program:

 task main() {
     motor[left] = 100;
     motor[right] = 100;
     wait1Msec(1000);
 }

This is a simple program for a robot which we assume has two motors one called left and one called right. The program sets the motors to run at 100% speed for one second (1000 miliseconds) after which the program ends and the motors will stop.

In the next post we will analyze this program in a bit more detail, and explain exactly what each line in the program means.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s