Drive Train Class
						
							
							
								package org.firstinspires.ftc.teamcode;

								import com.qualcomm.robotcore.hardware.DcMotor;
								import com.qualcomm.robotcore.hardware.Gamepad;

								public class DriveTrain
								{

									Gamepad gamepad1;
									Gamepad gamepad2;

									DcMotor leftFront;
									DcMotor rightFront;
									DcMotor leftBack;
									DcMotor rightBack;

									double dSpd = 2;

									boolean toggle = false;
									//Variables

									public DriveTrain (Gamepad g1, Gamepad g2, DcMotor lF, DcMotor rF, DcMotor lB, DcMotor rB)
									{

										gamepad1 = g1;
										gamepad2 = g2;

										leftFront = lF;
										rightFront = rF;
										leftBack = lB;
										rightBack = rB;

										//Constructor

									}

									void teleOpPackage ()
									{

										leftFront.setPower(((gamepad1.left_stick_y)-(gamepad1.left_stick_x)-(gamepad1.right_stick_x))/dSpd);
										rightFront.setPower(((-(gamepad1.left_stick_y))-(gamepad1.left_stick_x)-(gamepad1.right_stick_x))/dSpd);
										leftBack.setPower(((gamepad1.left_stick_y)+(gamepad1.left_stick_x)-(gamepad1.right_stick_x))/dSpd);
										rightBack.setPower(((-(gamepad1.left_stick_y))+(gamepad1.left_stick_x)-(gamepad1.right_stick_x))/dSpd);
										//Directions

										if (gamepad1.y)
										{

											dSpd = 1;
											//full speed

										} else if (gamepad1.x)
										{

											dSpd = 4/3;
											//Three Quarters Speed

										} else if (gamepad1.a)
										{

											dSpd = 2;
											//Half Speed

										} else if (gamepad1.b)
										{

											dSpd = 4;
											//Quarter Speed

										}

										if (gamepad1.right_trigger != 0)
										{

											leftFront.setPower(1);
											rightFront.setPower(-1);
											leftBack.setPower(1);
											rightBack.setPower(-1);
											//Straight Forward

										} else if (gamepad1.left_trigger != 0)
										{

											leftFront.setPower(-1);
											rightFront.setPower(1);
											leftBack.setPower(-1);
											rightBack.setPower(1);
											//Straight Backward

										}

										if (gamepad1.left_bumper && toggle==false)
										{

											leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
											rightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
											leftBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
											rightBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
											//Brake

										} else if (gamepad1.left_bumper && toggle==true)
										{

											leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
											rightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
											leftBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
											rightBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
											//Un-Brake

										}

									}

									double getDSpd ()
									{

										return this.dSpd;
										//Return dSpd to main program for telemetry

									}

									boolean getToggle ()
									{

										return this.toggle;
										//Return toggle to main program for telemetry

									}

									void forward (double spd, int tic)
									{

										leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										leftFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										rightFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										leftBack.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										rightBack.setMode(DcMotor.RunMode.RUN_USING_ENCODER);

										leftFront.setTargetPosition(tic);
										rightFront.setTargetPosition(tic);
										leftBack.setTargetPosition(tic);
										rightBack.setTargetPosition(tic);

										leftFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										rightFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										leftBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										rightBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);

										leftFront.setPower(spd);
										rightFront.setPower(spd);
										leftBack.setPower(spd);
										rightBack.setPower(spd);

										while (leftFront.isBusy() && rightFront.isBusy() && leftBack.isBusy() && rightBack.isBusy());

										kill();

										leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										//Encoder Forward

									}

									void backwards (double spd, int tic)
									{

										leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										leftFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										rightFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										leftBack.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										rightBack.setMode(DcMotor.RunMode.RUN_USING_ENCODER);

										leftFront.setTargetPosition(-tic);
										rightFront.setTargetPosition(-tic);
										leftBack.setTargetPosition(-tic);
										rightBack.setTargetPosition(-tic);

										leftFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										rightFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										leftBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										rightBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);

										leftFront.setPower(spd);
										rightFront.setPower(spd);
										leftBack.setPower(spd);
										rightBack.setPower(spd);

										while (leftFront.isBusy() && rightFront.isBusy() && leftBack.isBusy() && rightBack.isBusy());

										kill();

										leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										//Encoder Backwards

									}

									void right (double spd, int tic)
									{

										leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										leftFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										rightFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										leftBack.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										rightBack.setMode(DcMotor.RunMode.RUN_USING_ENCODER);

										leftFront.setTargetPosition(tic);
										rightFront.setTargetPosition(-tic);
										leftBack.setTargetPosition(-tic);
										rightBack.setTargetPosition(tic);

										leftFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										rightFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										leftBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										rightBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);

										leftFront.setPower(spd);
										rightFront.setPower(spd);
										leftBack.setPower(spd);
										rightBack.setPower(spd);

										while (leftFront.isBusy() && rightFront.isBusy() && leftBack.isBusy() && rightBack.isBusy());

										kill();

										leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										//Encoder Strafe Right

									}

									void left (double spd, int tic)
									{

										leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										leftFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										rightFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										leftBack.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										rightBack.setMode(DcMotor.RunMode.RUN_USING_ENCODER);

										leftFront.setTargetPosition(-tic);
										rightFront.setTargetPosition(tic);
										leftBack.setTargetPosition(tic);
										rightBack.setTargetPosition(-tic);

										leftFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										rightFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										leftBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										rightBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);

										leftFront.setPower(spd);
										rightFront.setPower(spd);
										leftBack.setPower(spd);
										rightBack.setPower(spd);

										while (leftFront.isBusy() && rightFront.isBusy() && leftBack.isBusy() && rightBack.isBusy());

										kill();

										leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										//Encoder Strafe Left

									}

									void tRight (double spd, int tic)
									{

										leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										leftFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										rightFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										leftBack.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										rightBack.setMode(DcMotor.RunMode.RUN_USING_ENCODER);

										leftFront.setTargetPosition(tic);
										rightFront.setTargetPosition(-tic);
										leftBack.setTargetPosition(tic);
										rightBack.setTargetPosition(-tic);

										leftFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										rightFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										leftBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										rightBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);

										leftFront.setPower(spd);
										rightFront.setPower(spd);
										leftBack.setPower(spd);
										rightBack.setPower(spd);

										while (leftFront.isBusy() && rightFront.isBusy() && leftBack.isBusy() && rightBack.isBusy());

										kill();

										leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										//Encoder Turn Right

									}

									void tLeft (double spd, int tic)
									{

										leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										leftFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										rightFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										leftBack.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
										rightBack.setMode(DcMotor.RunMode.RUN_USING_ENCODER);

										leftFront.setTargetPosition(-tic);
										rightFront.setTargetPosition(tic);
										leftBack.setTargetPosition(-tic);
										rightBack.setTargetPosition(tic);

										leftFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										rightFront.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										leftBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);
										rightBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);

										leftFront.setPower(spd);
										rightFront.setPower(spd);
										leftBack.setPower(spd);
										rightBack.setPower(spd);

										while (leftFront.isBusy() && rightFront.isBusy() && leftBack.isBusy() && rightBack.isBusy());

										kill();

										leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
										rightBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										//Encoder Turn Left

									}

									void kill ()
									{

										leftFront.setPower(0);
										rightFront.setPower(0);
										leftBack.setPower(0);
										rightBack.setPower(0);

									}

								}
								
							
							
						
Armstrong Class
						
							
							
								package org.firstinspires.ftc.teamcode;

								import com.qualcomm.hardware.bosch.BNO055IMU;
								import com.qualcomm.hardware.bosch.JustLoggingAccelerationIntegrator;
								import com.qualcomm.robotcore.hardware.DcMotor;
								import com.qualcomm.robotcore.hardware.Gamepad;
								import com.qualcomm.robotcore.hardware.HardwareMap;
								import com.qualcomm.robotcore.hardware.Servo;

								import org.firstinspires.ftc.robotcore.external.navigation.Acceleration;
								import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit;
								import org.firstinspires.ftc.robotcore.external.navigation.AxesOrder;
								import org.firstinspires.ftc.robotcore.external.navigation.AxesReference;
								import org.firstinspires.ftc.robotcore.external.navigation.Orientation;

								public class Armstrong
								{
									Gamepad gamepad1;
									Gamepad gamepad2;

									HardwareMap map;

									DcMotor turret;

									DcMotor lift;

									DcMotor arm;

									Servo claw;

									BNO055IMU imu;

									Orientation angles;
									Acceleration gravity;

									int rSpd = 2;

									float tDeg;

									double aSpd = 0.5;

									String clawPos = "Closed";
									//Variables

									public Armstrong (Gamepad g1, Gamepad g2, DcMotor t, DcMotor l, DcMotor a, Servo c, BNO055IMU i)
									{

										gamepad1 = g1;
										gamepad2 = g2;

										turret = t;

										lift = l;

										arm = a;

										claw = c;

										imu = i;

										BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();
										parameters.angleUnit           = BNO055IMU.AngleUnit.DEGREES;
										parameters.accelUnit           = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;
										parameters.calibrationDataFile = "BNO055IMUCalibration.json"; // see the calibration sample opmode
										parameters.loggingEnabled      = true;
										parameters.loggingTag          = "IMU";
										parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator();
										imu.initialize(parameters);

										angles   = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);

										tDeg = angles.firstAngle;
										//Constructor

									}

									void teleOpPackage ()
									{

										turret.setPower(-gamepad2.right_stick_x/rSpd);

										if (gamepad2.a)
										{

											rSpd = 2;

										} else if (gamepad2.b)
										{

											rSpd = 4;

										}

										lift.setPower(gamepad2.left_stick_y);

										if (gamepad2.right_trigger != 0)
										{

											arm.setPower(aSpd);

										} else if (gamepad2.left_trigger != 0)
										{

											arm.setPower(-aSpd);

										} else
										{

											arm.setPower(0.1);

										}

										if (gamepad2.x)
										{

											aSpd = 0.5;

										} else if (gamepad2.y)
										{

											aSpd = 0.25;

										}

										if (gamepad2.right_bumper)
										{

											claw.setPosition(0);

										} else if (gamepad2.left_bumper)
										{

											claw.setPosition(1);

										}

									}

									int getRSpd ()
									{

										return this.rSpd;

									}

									double getASpd ()
									{

										return this.aSpd;

									}

									String getClawPos ()
									{

										if (claw.getPosition() == 0)
										{

											clawPos = "Closed";

										} else if (claw.getPosition() == 1)
										{

											clawPos = "Open";

										}

										return this.clawPos;

									}

									void tRight (double spd, int tic)
									{

										turret.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										turret.setMode(DcMotor.RunMode.RUN_USING_ENCODER);

										turret.setTargetPosition(-tic);

										turret.setMode(DcMotor.RunMode.RUN_TO_POSITION);

										turret.setPower(spd);

										while (turret.isBusy());

										kill();

										turret.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

									}

									void tLeft (double spd, int tic)
									{

										turret.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										turret.setMode(DcMotor.RunMode.RUN_USING_ENCODER);

										turret.setTargetPosition(tic);

										turret.setMode(DcMotor.RunMode.RUN_TO_POSITION);

										turret.setPower(spd);

										while (turret.isBusy());

										kill();

										turret.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

									}

									void aTRight (double  spd, int angle)
									{

										tDeg = angles.firstAngle;

										while (tDeg > -angle - 5 || tDeg < -angle + 5)
										{

											tDeg = angles.firstAngle;

											turret.setPower(-spd);

										}

										kill();

									}

									void aTLeft ()
									{



									}

									void aTurn (double spd, int angle, double range)
									{

										tDeg = angles.firstAngle;

										if (angle > tDeg)
										{

											while (tDeg < angle - range || tDeg > angle + range)
											{

												turret.setPower(-spd);

												tDeg = angles.firstAngle;

											}

											tDeg = angles.firstAngle;

										} else if (angle < tDeg)
										{

											while (tDeg < angle - range || tDeg > angle + range)
											{

												turret.setPower(spd);

												tDeg = angles.firstAngle;

											}

											kill();

										}


									}

									void up (double spd, int time) throws InterruptedException
									{

										lift.setPower(-spd);

										Thread.sleep(time);

										kill();

									}

									void down (double spd, int time) throws InterruptedException
									{

										lift.setPower(spd);

										Thread.sleep(time);

										kill();

									}

									void rUp (double spd, int tic)
									{

										arm.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										arm.setMode(DcMotor.RunMode.RUN_USING_ENCODER);

										arm.setTargetPosition(tic);

										arm.setMode(DcMotor.RunMode.RUN_TO_POSITION);

										arm.setPower(spd);

										while (arm.isBusy());

										kill();

										arm.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

									}

									void rDown (double spd, int tic)
									{

										arm.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

										arm.setMode(DcMotor.RunMode.RUN_USING_ENCODER);

										arm.setTargetPosition(-tic);

										arm.setMode(DcMotor.RunMode.RUN_TO_POSITION);

										arm.setPower(spd);

										while (arm.isBusy());

										kill();

										arm.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);

									}

									void clamp ()
									{

										claw.setPosition(0);

									}

									void unclamp ()
									{

										claw.setPosition(1);

									}

									void kill ()
									{

										turret.setPower(0);

										lift.setPower(0);

										arm.setPower(0.2);

										claw.setPosition(1);

									}

								}
								
							
							
						
Drive Program

							

								package org.firstinspires.ftc.teamcode;

								import com.qualcomm.hardware.bosch.BNO055IMU;
								import com.qualcomm.robotcore.eventloop.opmode.OpMode;
								import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
								import com.qualcomm.robotcore.hardware.DcMotor;
								import com.qualcomm.robotcore.hardware.Gamepad;
								import com.qualcomm.robotcore.hardware.HardwareMap;
								import com.qualcomm.robotcore.hardware.Servo;

								@TeleOp (name="Right Hand Man", group="drive")

								public class Drive extends OpMode
								{

								    Gamepad g1;
								    Gamepad g2;

								    HardwareMap map;

								    DcMotor leftFront;
								    DcMotor rightFront;
								    DcMotor leftBack;
								    DcMotor rightBack;

								    DcMotor turret;

								    DcMotor lift;

								    DcMotor arm;

								    Servo claw;

								    BNO055IMU imu;

								    DriveTrain dT;
								    Armstrong a;

								    @Override
								    public void init()
								    {

								        leftFront = hardwareMap.dcMotor.get("leftFront");
								        rightFront = hardwareMap.dcMotor.get("rightFront");
								        leftBack = hardwareMap.dcMotor.get("leftBack");
								        rightBack = hardwareMap.dcMotor.get("rightBack");

								        turret = hardwareMap.dcMotor.get("turret");

								        lift = hardwareMap.dcMotor.get("lift");

								        arm = hardwareMap.dcMotor.get("arm");

								        claw = hardwareMap.servo.get("claw");

								        imu = hardwareMap.get(BNO055IMU.class, "imu");

								        dT = new DriveTrain(gamepad1, gamepad2 ,leftFront, rightFront, leftBack, rightBack);
								        a = new Armstrong(gamepad1, gamepad2, turret, lift, arm, claw, imu);

								        leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
								        rightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
								        leftBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
								        rightBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);

								        turret.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);

								        lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);

								        arm.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);

								        dT.kill();
								        a.kill();

								    }

								    @Override
								    public void start()
								    {

								        dT.kill();
								        a.kill();

								    }

								    @Override
								    public void loop()
								    {

								        dT.teleOpPackage();
								        a.teleOpPackage();

								        telemetry.addData("Drive Mode: ", dT.getDSpd());
								        telemetry.addData("Brake: ", dT.getToggle());

								        telemetry.addData("Turret Mode: ", a.getRSpd());

								        telemetry.addData("Arm Speed: ", a.getASpd());

								        telemetry.addData("Claw Position: ", a.getClawPos());

								        telemetry.update();

								    }

								    @Override
								    public void stop()
								    {

								        dT.kill();
								        a.kill();

								    }

								}

							

						
Red Autonomous

						

							package org.firstinspires.ftc.teamcode;

							import com.qualcomm.hardware.bosch.BNO055IMU;
							import com.qualcomm.hardware.bosch.JustLoggingAccelerationIntegrator;
							import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
							import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
							import com.qualcomm.robotcore.hardware.DcMotor;
							import com.qualcomm.robotcore.hardware.DcMotorSimple;
							import com.qualcomm.robotcore.hardware.HardwareMap;
							import com.qualcomm.robotcore.hardware.Servo;

							import org.firstinspires.ftc.robotcore.external.ClassFactory;
							import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName;
							import org.firstinspires.ftc.robotcore.external.navigation.Acceleration;
							import org.firstinspires.ftc.robotcore.external.navigation.Orientation;
							import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer;
							import org.firstinspires.ftc.robotcore.external.tfod.Recognition;
							import org.firstinspires.ftc.robotcore.external.tfod.TFObjectDetector;

							import java.util.List;

							@Autonomous (name = "Red Autonomous", group = "Auto")

							public class RedAuto extends LinearOpMode
							{

							    HardwareMap map;

							    DcMotor leftFront;
							    DcMotor rightFront;
							    DcMotor leftBack;
							    DcMotor rightBack;

							    DcMotor turret;

							    DcMotor lift;

							    DcMotor arm;

							    Servo claw;

							    BNO055IMU imu;

							    Orientation angles;
							    Acceleration gravity;

							    DriveTrain dT;
							    Armstrong a;

							    @Override
							    public void runOpMode () throws InterruptedException
							    {

							        BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();
							        parameters.angleUnit           = BNO055IMU.AngleUnit.DEGREES;
							        parameters.accelUnit           = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;
							        parameters.calibrationDataFile = "BNO055IMUCalibration.json"; // see the calibration sample opmode
							        parameters.loggingEnabled      = true;
							        parameters.loggingTag          = "IMU";
							        parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator();

							        leftFront = hardwareMap.dcMotor.get("leftFront");
							        rightFront = hardwareMap.dcMotor.get("rightFront");
							        leftBack = hardwareMap.dcMotor.get("leftBack");
							        rightBack = hardwareMap.dcMotor.get("rightBack");

							        turret = hardwareMap.dcMotor.get("turret");

							        lift = hardwareMap.dcMotor.get("lift");

							        arm = hardwareMap.dcMotor.get("arm");

							        claw = hardwareMap.servo.get("claw");

							        imu = hardwareMap.get(BNO055IMU.class, "imu");
							        imu.initialize(parameters);

							        dT = new DriveTrain(gamepad1, gamepad2 ,leftFront, rightFront, leftBack, rightBack);
							        a = new Armstrong(gamepad1, gamepad2,  turret, lift, arm, claw, imu);

							        leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
							        leftFront.setDirection(DcMotorSimple.Direction.REVERSE);

							        rightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);

							        leftBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
							        leftBack.setDirection(DcMotorSimple.Direction.REVERSE);

							        rightBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);

							        turret.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);

							        lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);

							        arm.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);

							        dT.kill();
							        a.kill();

							        waitForStart();

							        a.up(0.5, 500);

							        a.tRight(.25, 600);

							        a.rUp(0.5, 400);

							        //a.down(0.5, 1000);

							        dT.right(0.25, 100);

							        dT.forward(.25, 1600);

							        /*dT.backwards(0.25, 300);
							        a.down(0.25, 1500);
							        a.rUp(0.5, 50);
							        a.rDown(0.5, 450);
							        arm.setPower(-1);
							        //dT.tRight(0.125, 100);
							        dT.left(.25, 1200);
							        dT.tRight(.25, 500);*/

							        Thread.sleep(30000);

							    }

							}