Last active
November 18, 2015 02:36
-
-
Save bradllj/de66904703b03a5a3f94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma config(Motor, port7, claw, tmotorVex393_MC29, openLoop) | |
... | |
void clawopen (int time) | |
{ | |
motor[claw]=80; | |
wait1Msec(time); | |
motor[claw]=0; | |
} | |
... | |
task autonomous() | |
{ | |
if(SensorValue(button1)==1) | |
{ | |
driveforward (400); | |
clawclose(700); | |
armup (1600); | |
drivebackwards(890); | |
turnleft(400); | |
driveforward(500); | |
armdown(2200); | |
wait1Msec(500); | |
clawopen (1000); | |
drivebackwards(1000); | |
} | |
else | |
{ | |
swingleft(200);//blue | |
clawclose(700); | |
armup (1600); | |
drivebackwards(800); | |
turnright(550); | |
driveforward(500); | |
armdown(2200); | |
wait1Msec(500); | |
clawopen (1000); | |
drivebackwards(1000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment