Skip to content

Instantly share code, notes, and snippets.

@bradllj bradllj/autonomous.c
Last active Nov 18, 2015

Embed
What would you like to do?
#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
You can’t perform that action at this time.