#pragma config(Motor, port1, botRight, tmotorVex393, openLoop) #pragma config(Motor, port2, topLeft, tmotorVex393, openLoop) #pragma config(Motor, port3, botLeft, tmotorVex393, openLoop) #pragma config(Motor, port4, topRight, tmotorVex393, openLoop) #pragma config(Motor, port5, clawLift, tmotorVex393, openLoop) #pragma config(Motor, port6, claw, tmotorVex393, openLoop) //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// #pragma platform(VEX) //Competition Control and Duration Settings #pragma competitionControl(Competition) #pragma autonomousDuration(20) #pragma userControlDuration(120) #include "Vex_Competition_Includes.c" //Main competition background code...do not modify! void pre_auton() { /* * Don't change anything here */ bStopTasksBetweenModes = true; } task autonomous() { /* *Don't change anything here */ AutonomousCodePlaceholderForTesting(); } void driveLeft(int fwd) { int fwdCmd = 0; if(abs(fwd) < 15) fwdCmd = 0; else fwdCmd = fwd; motor[botLeft] = -fwdCmd; motor[topLeft] = -fwdCmd; } void driveRight(int fwd) { int fwdCmd = 0; if(abs(fwd) < 15) fwdCmd = 0; else fwdCmd = fwd; motor[botRight] = -fwdCmd; motor[topRight] = -fwdCmd; } task usercontrol() { while (true) { driveLeft(vexRT[Ch3]); driveRight(vexRT[Ch2]); if(vexRT[Btn5U] == 1) { motor[clawLift] = 127; } else if(vexRT[Btn6U]==1) { motor[clawLift] = -127; } else { motor[clawLift] = 0; } if(vexRT[Btn5D] == 1) { motor[claw] = 127; } else if(vexRT[Btn6D]==1) { motor[claw] = -127; } else { motor[claw] = 0; } //UserControlCodePlaceholderForTesting(); } }