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 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 RedSai() //potential 20pt auton { deploy(); // go for second ball knockdown moveStraight(1, 0, 950); wait1Msec(300); moveStraight(-1, 0, 950); resetValues(100); waitForButton(); moveStraight(1,0,1500); //move forward spin(-1,0,180); // turn towards the cache lift(HIGH); // nearest 100 holdArmHigh(); moveStraight(1, 0, 650); // reaches goal intake(-1); wait1Msec(1000); // outtake }
void skills() { Alex(); // 15 points liftDown(); waitForButton(); wait10Msec(50); while(SensorValue[waitingButtonRed] == 0 && SensorValue[waitingButtonBlue] == 0) { setRight(127); setLeft(127); } // this works for crossing bump resetValues(0); // I don't know why it doesn't reach here... // end cross bump waitForButton(); intake(1); wait10Msec(10); moveStraight(1, 0, 455); //picks up wait10Msec(50); moveStraight(-1, 0, 475);//comes back // end pick up 3 waitForButton(); wait10Msec(50); while(SensorValue[waitingButtonRed] == 0 && SensorValue[waitingButtonBlue] == 0) { setRight(127); setLeft(127); } resetValues(0); // end cross bump waitForButton(); moveStraight(1, 0, 1400); // 1600 is just before goal lift(HIGH); // nearest 100 holdArmHigh(); moveStraight(1, 0, 350); // reaches goal intake(-1); wait1Msec(500); // outtake moveStraight(-1, 0, 400); //move back away from goal...Apparently Safety is greater than move forward liftDown(); moveStraight(-1, 0, 1500); resetValues(0); // end Alex 2.0 waitForButton(); wait10Msec(50); while(SensorValue[waitingButtonRed] == 0 && SensorValue[waitingButtonBlue] == 0) { setRight(127); setLeft(127); } setRight(0); setLeft(0); // end cross waitForButton(); intake(1); wait10Msec(100); moveStraight(1, 0, 700); resetValues(50); // end intake big ball moveStraight(-1, 0, 200); softSpin(-1, 0, 200); intake(-1); resetValues(1200); // end outtake spin(1, 0, 200); intake(1); moveStraight(1, 0, 900); intake(0); wait10Msec(30); moveStraight(-1, 0, 200); softSpin(-1, 0, 200); }
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 }