Skip to content

Commit

Permalink
encoders
Browse files Browse the repository at this point in the history
  • Loading branch information
fulton committed Jan 23, 2020
1 parent c168117 commit 5c08e1b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class AutoEncoder extends LinearOpMode {
public void runOpMode() throws InterruptedException {
//get the motors
DcMotor motor0 = hardwareMap.dcMotor.get("motor0");
motor0.setMode(DcMotor.RunMode.RESET_ENCODERS);
DcMotor motor1 = hardwareMap.dcMotor.get("motor1");
DcMotor motor2 = hardwareMap.dcMotor.get("motor2");
DcMotor motor3 = hardwareMap.dcMotor.get("motor3");
Expand All @@ -45,7 +46,7 @@ public void runOpMode() throws InterruptedException {
//move claw in correct position
//move to blocks
new Move().right(motor0, motor1, motor2, motor3);
sleep(2700);
while (motor0.getCurrentPosition() < 60000)
//scan for black
new Move().back(motor0, motor1, motor2, motor3);
telemetry.addData("while is running 1", "");
Expand Down

0 comments on commit 5c08e1b

Please sign in to comment.