FtcRobotController/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/AutonFourR.java
2022-01-27 17:14:59 -06:00

47 lines
1.3 KiB
Java

package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
@Autonomous(name="Auton 4.2 Red", preselectTeleOp = MainOpModeName.name)
public class AutonFourR extends BaseLinearOpMode {
@Override
public void runOpMode() {
this.construct();
api.print("Status", "Initializing, please wait");
MovementAPI.init(api, motors);
motors.lift.setDirection(API.Direction.REVERSE, false);
api.clear();
api.print("Press play to start");
waitForStart();
MovementAPI.move(-180, 0.4, true);
api.pause(0.8);
MovementAPI.stop();
motors.lift.start(0.25);
api.pause(3);
motors.lift.stop();
motors.lift.start(-0.25);
api.pause(2.5);
motors.lift.stop();
MovementAPI.move(0, 0.4, true);
api.pause(1);
MovementAPI.move(-90, 0.4, true);
api.pause(3);
MovementAPI.move(-180, 0.4, true);
api.pause(1);
MovementAPI.move(-90, 0.4, true);
api.pause(1);
MovementAPI.move(0, 0.2, true);
api.pause(1.6);
MovementAPI.move(0, 0.1, true);
motors.carousel.start(-0.75);
api.pause(5);
motors.carousel.stop();
MovementAPI.move(180, 0.4, true);
api.pause(0.6);
MovementAPI.stop();
}
}