Dump

```
void tankdrive() {
int deadzone1 = -10;
int deadzone3 = 10;
while (true) {
Controller1.Axis2.position() < deadzone1)) {
Brain.Screen.printAt(15, 15, "%d", Controller1.Axis2.position(percent));
Brain.Screen.printAt(50, 50, "%d", Controller1.Axis3.position(percent));
frontleft.spin(reverse, Controller1.Axis3.position(), percent);
frontright.spin(reverse, Controller1.Axis2.position(), percent);
backleft.spin(reverse, Controller1.Axis3.position(), percent);
backright.spin(reverse, Controller1.Axis2.position(), percent);
} else {
(frontleft.stop(), frontright.stop(), backleft.stop(), backright.stop());
}
if (Controller1.ButtonL1.pressing()) {
(flywheel.spin(forward, 100, pct));
} else if (Controller1.ButtonL2.pressing()) {
flywheel.stop();
}
if (Controller1.ButtonUp.pressing()) {
(kicker.spin(forward, 100, pct));
} else if (Controller1.ButtonDown.pressing()) {
(kicker.spin(reverse, 100, pct));
} else {
kicker.stop();
}
if (Controller1.ButtonR1.pressing()) {
intake.spin(forward, 100, pct);
} else if (Controller1.ButtonR2.pressing()) {
intake.spin(reverse, 100, pct);
} else {
intake.stop();
}
}
}

```

void usercontrol(void) {

while (1) {

wait(20, msec);

frontleft.setStopping(coast);

frontright.setStopping(coast);

backleft.setStopping(coast);

backright.setStopping(coast);

intake.setStopping(hold);

int deadzone1 = -10;

int deadzone3 = 10;

float speedcontrol = 1;

while (true) {

Brain.Screen.printAt(15, 25, "POSITIONS");

Brain.Screen.printAt(30, 45, "%f", frontleft.position(degrees));

Brain.Screen.printAt(30, 65, "%f", frontright.position(degrees));

Brain.Screen.printAt(30, 85, "%f", backleft.position(degrees));

Brain.Screen.printAt(30, 105, "%f", backright.position(degrees));

Brain.Screen.printAt(150, 65, "You are on the match code.");

Brain.Screen.printAt(150, 85, "Are you sure you're at a comp?");

Brain.Screen.drawRectangle(25, 120, 100, 100, color());

Brain.Screen.printAt(150, 175, "IF FOUND PLEASE RETURN TO 4610F");

speedcontrol = 1;

if (Controller1.ButtonLeft.pressing()) {

speedcontrol = .5;

}

wait(50,msec);

Brain.Screen.clearScreen();

Controller1.Axis2.position() < deadzone1)) {

frontleft.spin(reverse, speedcontrol \* Controller1.Axis3.position(), percent);

frontright.spin(reverse, speedcontrol \* Controller1.Axis2.position(), percent);

backleft.spin(reverse, speedcontrol \* Controller1.Axis3.position(), percent);

backright.spin(reverse, speedcontrol \* Controller1.Axis2.position(), percent);

} else {

(frontleft.stop(), frontright.stop(), backleft.stop(), backright.stop());

}

if (Controller1.ButtonL1.pressing()) {

(flywheel.spin(forward, 55, pct));

}

if (Controller1.ButtonL2.pressing()) {

flywheel.stop();

}

if (Controller1.ButtonUp.pressing()) {

(kicker.spin(forward, 75, pct));

} else if (Controller1.ButtonDown.pressing()) {

(kicker.spin(reverse, 75, pct));

} else {

kicker.stop();

}

if (Controller1.ButtonR1.pressing()) {

intake.spin(forward, 100, pct);

} else if (Controller1.ButtonR2.pressing()) {

intake.spin(reverse, 100, pct);

} else {

intake.stop();

}

if (Controller1.ButtonY.pressing()) {

frontleft.setStopping(hold);

frontright.setStopping(hold);

backleft.setStopping(hold);

backright.setStopping(hold);

} else if (Controller1.ButtonA.pressing()) {

frontleft.setStopping(coast);

frontright.setStopping(coast);

backleft.setStopping(coast);

backright.setStopping(coast);

}

if (Controller1.ButtonB.pressing()) {

string.spin(forward,100,pct);

} else {

string.stop();

}

}

}

}