View Single Post
  #3   Spotlight this post!  
Unread 06-05-2009, 21:16
pyr0b0y pyr0b0y is offline
Programmer/Electrical
AKA: Josh
FRC #0253 (Mills Robotics Team)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2004
Location: Millbrae
Posts: 78
pyr0b0y is an unknown quantity at this point
Send a message via AIM to pyr0b0y
Re: FRC Software Help

Quote:
Originally Posted by henrylu33 View Post
Hi I have never competed in the First Robotics competition but as a project in my Technical Writing class in college I involved in creating a manual for a local high school robotics team. I am responsible for the software portion and on the checklist there is a section that lists three parts I do not understand. Any help would be appreciated. Here are the three things:
- Describe the operation of the default program code
- Load the default program onto the robot controller
- Load the default code onto a previous year’s robot and modify it to drive in a predetermined route
Please advise on how I would best put this information in a manual to help students better understand the task at hand. Thank you.
If you are going to be using Windriver, the default program code, SimpleRobot, uses arcade drive and a very basic autonomous mode, the teleop mode just allows tank drive with leftStick/rightStick.

Loading the code onto the robot is done by setting the cRio as the remote system then downloading onto the robot.

To accomplish the last part, you will use autonomous mode. a simple example of setting a predetermined is

Code:
void Autonomous(void)
	{
		GetWatchdog().SetEnabled(false);
		myRobot.Drive(0.5, 0.5); 						// drive forwards half speed 
		Wait(1.0); 											// for 1 second
		myRobot.Drive(0.75, 0.75); 						// drive forwards three-quarter speed
		Wait(4.0);											// for 4 seconds
		myRobot.Drive(-0.5, 0.75);						// turn left
		Wait(2.0);											// for 2 seconds
		myRobot.Drive(0.75, -0.5);						// turn right
		Wait(2.0);											// for 2 seconds
		myRobot.Drive(0.5, 0.5);						// drive straight at half speed
		Wait(1.0);											// for 1 second
		myRobot.Drive(0.75, 0.75);						// drive forwards at 3/4 speed
		Wait(5.0);											// for 5 seconds
	}
Hope that helps!