/* Psuedocode Ramp Forward -> [Cross Barrier] -> Raise Arm HIGH -> Hold Arm HIGH -> Ramp Zero -> [Reach Goal] -> Outtake -> [Finish Outtake] -> Stop Intake -> Ramp Forward -> Ramp Zero -> [Reach Barrier] -> Lower Arm LOW -> Ramp Backward -> [Reach Square] -> Hard Zero Wait Until Press -> Raise Arm BARRIER -> Hold Arm BARRIER -> Ramp Forward -> Ramp Zero -> [Reach Barrier] -> Ramp Backward -> [Reach Square] -> Hard Zero -> Wait Until Press -> Ramp Forward -> Ramp Zero -> [Reach Barrier] */ void Alex() // Caches preload (5) + Knocks 2 big balls (10) { deploy(); moveStraight(1, 0, 1600); // 1600 is just before goal lift(HIGH); // nearest 100 holdArm(); moveStraight(1, 0, 300); // reaches goal //wait1Msec(1000); intake(-1); wait1Msec(500); // outtake intake(0); moveStraight(-1, 0, 400); //move back away from goal...Apparently Safety is greater than move forward liftDown(); moveStraight(-1, 0, 1500); waitForButton(); lift(BARRIER); holdArm(); intake(-1); moveStraight(1, 0, 550); //estimated guess based on 10Q's values wait1Msec(300); moveStraight(-1, 0, 550); waitForButton(); moveStraight(1, 0, 950); wait1Msec(300); moveStraight(-1, 0, 950); resetValues(100); }
void redUdit() { deploy(); intake(1); wait10Msec(10); moveStraight(1, 0, 475); //picks up wait10Msec(50); moveStraight(-1, 0, 475);//comes back //intake(0)(); spin(1, 0, 400); lift(BUMP); holdArm(); waitForButton(); intake(-1); wait10Msec(100); resetValues(0); liftDown(); // added // end Devansh waitForButton(); intake(1); moveStraight(1, 0, (HALF_TILE)); wait10Msec(50); pickUpBall(1); spin(-1, 0, 200); crossBump(); lift(BARRIER); holdArm(); wait10Msec(30); moveStraight(1, 0, 550); intake(-1); // end udit resetValues(1000); }
void redDevansh() // Places preload (1-2) + 2 buckies (2-4) + TURN LEFT Knocks buckies (1-6) { deploy(); intake(1); wait10Msec(10); moveStraight(1, 0, 455); //picks up wait10Msec(50); moveStraight(-1, 0, 475);//comes back intake(0); // end part 1: prepare dump waitForButton(); lift(BUMP); holdArm(); intake(-1); resetValues(1200); // end part 2: dump waitForButton(); liftDown(); wait10Msec(100); moveStraight(1, 0, 700); // end part 3: prepare hit spin(-1, 0, 200); intake(-1); lift(BUMP); holdArm(); noRamp(1, 250); resetValues(0); // end part 4: hit }
void redUdit() { deploy(); intake(true); wait10Msec(10); moveStraight(1, 0, 475); wait10Msec(50); moveStraight(-1, 0, 475); //stopIntake(); lift(BUMP); holdArm(); waitForButton(); intake(false); wait10Msec(100); waitForButton(); resetValues(0); liftDown(); // end Devansh waitForButton(); intake(true); moveStraight(1, 0, (HALF_TILE)); wait10Msec(50); pickUpBall(1); spin(-1, 0, 200); crossBump(); lift(BARRIER); holdArm(); wait10Msec(30); moveStraight(1, 0, 550); intake(false); // end udit resetValues(1000); }
/* Psuedocode Ramp Forward -> [Cross Barrier] -> Raise Arm HIGH -> Hold Arm HIGH -> Ramp Zero -> [Reach Goal] -> Outtake -> [Finish Outtake] -> Stop Intake -> Ramp Forward -> Ramp Zero -> [Reach Barrier] -> Lower Arm LOW -> Ramp Backward -> [Reach Square] -> Hard Zero Wait Until Press -> Raise Arm BARRIER -> Hold Arm BARRIER -> Ramp Forward -> Ramp Zero -> [Reach Barrier] -> Ramp Backward -> [Reach Square] -> Hard Zero -> Wait Until Press -> Ramp Forward -> Ramp Zero -> [Reach Barrier] */ void Alex() // Caches preload (5) + Knocks 2 big balls (10) { deploy(); moveStraight(1, 0, 1550); // 1600 is just before goal...changed for some reason lift(HIGH); // only accurate to the nearest 100... may need to adjust HIGH value holdArm(); moveStraight(1, 0, 300); // reaches goal //wait1Msec(1000); intake(false); wait1Msec(1000); // outtake stopIntake(); moveStraight(-1, 0, 400); // move back away from goal...Apparently Safety is greater than move forward liftDown(); moveStraight(-1, 0, 1500); waitForButton(); lift(BARRIER); holdArm(); intake(false); moveStraight(1, 0, 550); // estimated guess based on 10Q's values - WORKS wait1Msec(300); moveStraight(-1, 0, 550); waitForButton(); moveStraight(1, 0, 950); // A bit of trouble... Not sure if you want to spin rollers for this hit... wait1Msec(300); // outtaking pushes the ball away + needs good aiming moveStraight(-1, 0, 950); resetValues(100); }
void redDevansh() // Places preload (1-2) + 2 buckies (2-4) + TURN LEFT Knocks buckies (1-6) + Places two Balls (2) { deploy(); intake(true); wait10Msec(10); moveStraight(1, 0, 475); wait10Msec(50); moveStraight(-1, 0, 475); //stopIntake(); lift(BUMP); holdArm(); waitForButton(); intake(false); wait10Msec(100); waitForButton(); resetValues(0); liftDown(); // end Devansh waitForButton(); intake(true); moveStraight(1, 0, (HALF_TILE)); wait10Msec(50); pickUpBall(1); spin(-1, 0, 200); crossBump(); lift(BARRIER); holdArm(); wait10Msec(30); moveStraight(1, 0, 550); intake(false); // end udit resetValues(1000); }
void blueUdit() { deploy(); intake(1); wait10Msec(10); moveStraight(1, 0, 475); //picks up wait10Msec(50); moveStraight(-1, 0, 475);//comes back //intake(0)(); spin(1, 0, 400); lift(BUMP); holdArm(); waitForButton(); intake(-1); wait10Msec(100); resetValues(0); liftDown(); // added waitForButton(); //liftDown(); // end Devansh //waitForButton(); intake(1); moveStraight(1, 0, (HALF_TILE)); wait10Msec(50); pickUpBall(1); spin(1, 0, 200); //crossBump(); lift(BUMP); nMotorEncoder[LeftMWheel] = 0; if(true) { setRight(127); wait10Msec(10); setLeft(127); } while (abs(nMotorEncoder[LeftMWheel]) < 500) { setRight(127); setLeft(127); } setRight(0); setLeft(0); lift(BARRIER); holdArm(); wait10Msec(30); moveStraight(1, 0, 550); intake(-1); // end udit resetValues(1000); }
void blueBrian() { moveStraight(1, 0, 1000); // estimate going 2 tiles, under bump perpendicular to barrier wait10Msec(30); // stableeeeeeeeeeeeeeeee hit ball gently? spin(-1, 0, 100); // uh... hopefully it doesn't fall out? //wait10Msec(70); 1 sec stabilization time already incorporated in spin() lift(HIGH); // uh.. holdArmHigh(); wait10Msec(70); moveStraight(1, 0, 450); wait10Msec(70); intake(-1); wait10Msec(10); // lol intake(0); moveStraight(-1, 0, 200); // lol intake(-1); // lol wait10Msec(20); intake(0); moveStraight(-1, 0, 250); resetValues(0); liftDown(); spin(1, 0, 100); moveStraight(-1, 0, 1000); waitForButton(); // end 15 pts lift(BARRIER); holdArm(); moveStraight(1, 0, 950); // end 5 pts, or 20pts total }
void Alex2() // Knocks 2 big balls (10) then caches preload { deploy(); lift(BARRIER); holdArm(); intake(-1); moveStraight(1, 0, 580); //estimated guess based on 10Q's values wait1Msec(300); //moveStraight(-1, 0, 550); moveStraight(-1, 0, 580); waitForButton(); moveStraight(1, 0, 950); wait1Msec(300); //moveStraight(-1, 0, 950); moveStraight(-1, 0, 950); resetValues(100); waitForButton(); moveStraight(1, 0, 1420); // maintenence and recalibrating needed lift(HIGH); // nearest 100 holdArmHigh(); moveStraight(1, 0, 500); // reaches goal //wait1Msec(1000); intake(-1); wait1Msec(500); // outtake moveStraight(-1, 0, 400); //move back away from goal...Apparently Safety is greater than move forward motor[LeftArm] = motor[RightArm] = -127; wait1Msec(800); motor[LeftArm] = motor[RightArm] = 0; // end score bucky moveStraight(-1, 0, 1300); // now user readjust for first ball }
void AlexAlt() // Caches preload (5) + Knocks 2 big balls (10) { deploy(); moveStraight(1, 0, 1600); // maintenence and recalibrating needed liftTime(1,300); holdArmHigh(); moveStraight(1, 0, 650); // reaches goal //wait1Msec(1000); intake(-1); wait1Msec(500); // outtake moveStraight(-1, 0, 400); //move back away from goal...Apparently Safety is greater than move forward liftDown(); // end score bucky moveStraight(-1, 0, 1400); // now user readjust for first ball waitForButton(); lift(BARRIER); holdArm(); intake(-1); moveStraight(1, 0, 580); //estimated guess based on 10Q's values wait1Msec(300); //moveStraight(-1, 0, 550); moveStraight(-1, 0, 580); waitForButton(); moveStraight(1, 0, 950); wait1Msec(300); //moveStraight(-1, 0, 950); moveStraight(-1, 0, 950); resetValues(100); }
void redDevansh() // Places preload (1-2) + 2 buckies (2-4) + TURN LEFT Knocks buckies (1-6) + Places two Balls (2) { deploy(); intake(1); wait10Msec(10); moveStraight(1, 0, 150); // 200 estimated based on 10Q values wait10Msec(50); moveStraight(-1, 0, 150); intake(0); waitForButton(); lift(BUMP); holdArm(); intake(-1); waitForButton(); resetValues(0); liftDown(); wait10Msec(20); intake(1); moveStraight(1, 0, (TILE + HALF_TILE)); // theory wait10Msec(50); // intake ball hopefully lift(BUMP); holdArm(); intake(0); spin(0, -1, RIGHT_ANGLE); // RED SIDE TURN LEFT knocks buckies hopefully wait10Msec(30); intake(-1); // outtake ball hopefully wait10Msec(300); intake(0); spin(0, 1, RIGHT_ANGLE); liftDown(); intake(1); moveStraight(1, 0, (TILE + HALF_TILE)); // theory lift(BUMP); holdArm(); intake(0); spin(0, -1, RIGHT_ANGLE); // RED SIDE TURN LEFT wait10Msec(30); intake(-1); resetValues(10); }
void skills() { deploy(); wait10Msec(20); intakeSlow(1); moveStraight(1, 0, 430); //picks up wait10Msec(50); moveStraight(-1, 0, 430);//comes back intake(1); lift(BUMP - 50); holdArm(); moveStraight(-1,0,700);//hops bump waitForButton(); liftDown(); intake(0); waitForButton(); moveStraight(1, 0, 1400); // maintenence and recalibrating needed wait10Msec(30); lift(HIGH); holdArmHigh(); moveStraight(1, 0, 430); // reaches goal //wait1Msec(1000); intake(-1); wait10Msec(150); // outtake moveStraight(-1, 0, 400); //move back away from goal...Apparently Safety is greater than move forward lift(LOW); wait10Msec(50); intake(0); // end score bucky moveStraight(-1, 0, 1400); // now user readjust for first ball waitForButton(); moveStraight(1,0,600); spin(1,0,200); lift(BARRIER); holdArmHigh(); moveStraight(1, 0, 475); wait10Msec(40); moveStraight(-1, 0, 275); }
void crossBump() { lift(BUMP); holdArm(); nMotorEncoder[LeftMWheel] = 0; while(abs(nMotorEncoder[LeftMWheel]) < 300) { setRight(100); setLeft(100); } while(abs(nMotorEncoder[LeftMWheel]) < 600) { setRight(50); setLeft(50); } while(abs(nMotorEncoder[LeftMWheel]) < 800) { setRight(35); setLeft(35); } //liftDown(); setRight(0); setLeft(0); //resetValues(0); }
void redUdit() { deploy(); wait10Msec(20); moveStraight(1, 0, 450); //picks up wait10Msec(50); moveStraight(-1, 0, 450);//comes back intake(0); waitForButton(); moveStraight(1, 0, (610)); spin(-1,0, 240); moveStraight(1, 0, (575)); lift(BARRIER - 300); holdArm(); intake(-1); wait10Msec(130); liftDown(); intake(0); }
bool touch() { { void crossBump() { /* lift(BUMP); holdArm(); nMotorEncoder[LeftMWheel] = 0; while(abs(nMotorEncoder[LeftMWheel]) < 300) { setRight(100); setLeft(100); } while(abs(nMotorEncoder[LeftMWheel]) < 600) { setRight(50); setLeft(50); } while(abs(nMotorEncoder[LeftMWheel]) < 800) { setRight(35); setLeft(35); } //liftDown(); setRight(0); setLeft(0); //resetValues(0); */ } /* Psuedocode Ramp Forward -> [Cross Barrier] -> Raise Arm HIGH -> Hold Arm HIGH -> Ramp Zero -> [Reach Goal] -> Outtake -> [Finish Outtake] -> Stop Intake -> Ramp Forward -> Ramp Zero -> [Reach Barrier] -> Lower Arm LOW -> Ramp Backward -> [Reach Square] -> Hard Zero Wait Until Press -> Raise Arm BARRIER -> Hold Arm BARRIER -> Ramp Forward -> Ramp Zero -> [Reach Barrier] -> Ramp Backward -> [Reach Square] -> Hard Zero -> Wait Until Press -> Ramp Forward -> Ramp Zero -> [Reach Barrier] */ void Alex() // Caches preload (5) + Knocks 2 big balls (10) { deploy(); moveStraight(1, 0, 1550); // 1600 is just before goal lift(HIGH); // nearest 100 holdArmHigh(); moveStraight(1, 0, 300); // reaches goal //wait1Msec(1000); intake(-1); wait1Msec(500); // outtake moveStraight(-1, 0, 400); //move back away from goal...Apparently Safety is greater than move forward liftDown(); // end score bucky moveStraight(-1, 0, 1400); // now user readjust for first ball waitForButton(); lift(BARRIER); holdArm(); intake(-1); moveStraight(1, 0, 580); //estimated guess based on 10Q's values wait1Msec(300); //moveStraight(-1, 0, 550); moveStraight(-1, 0, 580); waitForButton(); moveStraight(1, 0, 950); wait1Msec(300); //moveStraight(-1, 0, 950); moveStraight(-1, 0, 950); resetValues(100); } void blueDevansh() // Places preload (1-2) + 2 buckies (2-4) + TURN RIGHT Knocks buckies (1-6) { deploy(); intake(1); wait10Msec(10); moveStraight(1, 0, 455); //picks up wait10Msec(50); moveStraight(-1, 0, 475);//comes back intake(0); // end part 1: prepare dump waitForButton(); lift(BUMP); holdArm(); intake(-1); resetValues(1200); // end part 2: dump waitForButton(); liftDown(); wait10Msec(100); moveStraight(1, 0, 700); // end part 3: prepare hit spin(1, 0, 200); intake(-1); lift(BUMP); holdArm(); noRamp(1, 250); resetValues(0); // end part 4: hit }