Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma config(Motor, port2, rightMotor, tmotorNormal, openLoop, reversed)
- #pragma config(Motor, port3, arm, tmotorNormal, openLoop)
- #pragma config(Motor, port4, leftMotor, tmotorNormal, openLoop)
- #pragma config(Motor, port5, claw, tmotorNormal, openLoop)
- #pragma platform(VEX)
- #pragma competitionControl(Competition)
- #pragma autonomousDuration(20)
- #pragma userControlDuration(120)
- #include "Vex_Competition_Includes.c" //Main competition background code
- void pre_auton(){
- bStopTasksBetweenModes = true;
- while(1 == 1){
- motor[leftMotor] = vexRT[Ch3]; // Left Joystick Y value
- motor[rightMotor] = vexRT[Ch2]; // Right Joystick Y value
- if(vexRT[Btn5U]){
- motor[arm] = 127;
- }else if(vexRT[Btn5D]){
- motor[arm] = -127;
- }else{
- motor[arm] = 0;
- }
- if(vexRT[Btn6U]){
- motor[claw] = 127;
- }else if(vexRT[Btn6D]){
- motor[claw] = -127;
- }else {
- motor[claw] = 0;
- }
- }
- }
- task autonomous(){
- }
- task usercontrol(){
- while (true){
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment