RobotC Resources
From STEMRobotics
(Difference between revisions)
Current revision (13:58, 10 July 2010) (view source) (→Program a VEX Spike) |
|||
Values higher than 15 are not recommended since there are system level tasks that run. | Values higher than 15 are not recommended since there are system level tasks that run. | ||
+ | == Not using the competition template== | ||
+ | Key thing is to use ''bVexAutonomousMode = false;'' that allows the remote controls to work. | ||
+ | |||
+ | Below is a sample from one of our protobots | ||
+ | |||
+ | <source lang=c> | ||
+ | task main() | ||
+ | { | ||
+ | bVexAutonomousMode = false; //Activates Remote Control Mode | ||
+ | bMotorReflected[LeftFront] = true; //Port 2 Motor Direction Flipped | ||
+ | bMotorReflected[LeftRear] = true; | ||
+ | bMotorReflected[LeftArm] = true; | ||
+ | bMotorReflected[RightArm] = false; | ||
+ | while (1 == 1) { | ||
+ | motor[RightFront] = vexRT(Ch3); | ||
+ | motor[RightRear] = vexRT(Ch3); | ||
+ | motor[LeftFront] = vexRT(Ch2); | ||
+ | motor[LeftRear] = vexRT(Ch2); | ||
+ | motor[LeftArm] = vexRT(Ch5); | ||
+ | motor[RightArm] = vexRT(Ch5); | ||
+ | motor[Claw] = vexRT(Ch6); | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
== Program a VEX Spike == | == Program a VEX Spike == | ||
The [[VEX Spike]] page has how to program a VEX Spike. You need to make a special cable to attach the Spike to the VEX. | The [[VEX Spike]] page has how to program a VEX Spike. You need to make a special cable to attach the Spike to the VEX. |