//******************************************************************************//
//                              Forward then Reverse                            //
//                              RobotC on NXT                                   //
//                                                                              //
//  This program allows your robot to move forward and reverse at assigned      //
//  speeds.                                                                     //
//                                                                              //
//******************************************************************************//
//				Focus                                           //
//                                                                              //
//  This program focuses on moving a robot forward and then reverse, simply by changing the speed //
//  the direction of the motors in the program. This is done by changing the motor speed to a  //
//  negative instead of a positive.  The focus of this program is to learn how to make the robot //
// travel backward and forwards, by changing only one modifier.       //
//                                                                              //
//******************************************************************************//
//				Notes                                           //
//				                                                //
//  1. To change the forward movement's speed replace the first two "100"'s     //
//     with the desired speed number.                                           //
//  2. To change the backward movement's speed replace the second set of        //
//     "100"'s with the desired negative speed.                                 // 
//  3. To change the duration of any movement, replace the wait1Msec() command  //
//     following its motor settings with the desired number of milliseconds it  //
//     should run for.                                                          //
//                                                                              //
//******************************************************************************//
//				Motors & Sensors                                //
//                                                                              //
//  [I/O Port]          [Name]          [Type]          [Description]           //
//  Port A              none            Motor           Right Motor             //
//  Port B              none            Motor           Left Motor              //
//                                                                              //
//******************************************************************************//


task main()			
{				
   motor[motorA] = 100;    //motor A is run at a 100 power level
   motor[motorB] = 100;    //motor A is run at a 100 power level
   wait1Msec(4000);        //the program waits 4000 milliseconds before running further code

   motor[motorA] = -100;   //motor A is run at a 100 power level	
   motor[motorB] = -100;   //motor A is run at a 100 power level
   wait1Msec(4000);        //the program waits 4000 milliseconds before running further code
}