Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Train' into Train
Browse files Browse the repository at this point in the history
  • Loading branch information
ntt305 committed Nov 5, 2024
2 parents 0bf1ff1 + 360a1ff commit bd3f1e5
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package org.firstinspires.ftc.teamcode.opmode;

import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.DcMotorSimple;

public class OmegaTeleOp extends LinearOpMode {
private DcMotor topLeftMotor;
private DcMotor topRightMotor;
private DcMotor bottomLeftMotor;
private DcMotor bottomRightMotor;

private DcMotor trumansArm = hardwareMap.get(DcMotor.class, "arm");

@Override

public void runOpMode() throws InterruptedException {
topLeftMotor = hardwareMap.get(DcMotor.class,"FL");
topRightMotor = hardwareMap.get(DcMotor.class,"FR");
bottomLeftMotor = hardwareMap.get(DcMotor.class,"BL");
bottomRightMotor = hardwareMap.get(DcMotor.class,"BR");
topLeftMotor.setDirection(DcMotorSimple.Direction.REVERSE);
bottomLeftMotor.setDirection(DcMotorSimple.Direction.REVERSE);
while (opModeIsActive()) {
double y = -gamepad1.left_stick_y; // Y stick is reversed!
double x = gamepad1.left_stick_x;
double rx2 = gamepad1.right_stick_x;

topLeftMotor.setPower(y + x + rx2);
bottomLeftMotor.setPower(y - x + rx2);
topRightMotor.setPower(y - x - rx2);
bottomRightMotor.setPower(y + x - rx2);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.firstinspires.ftc.teamcode.opmode;
////this loop is for driving forward and backwards////

import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.hardware.DcMotor;

public class PIDLOOP extends LinearOpMode {
public void runOpMode() throws InterruptedException {

}
}

0 comments on commit bd3f1e5

Please sign in to comment.