FreeOfCharge2022-23/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/createdcode/oldthings/SpinTheMotor.java
2022-10-20 21:34:22 -05:00

23 lines
720 B
Java

package org.firstinspires.ftc.teamcode.createdcode.oldthings;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.hardware.DcMotor;
@Disabled
@Autonomous
public class SpinTheMotor extends LinearOpMode {
private DcMotor testMotor;
@Override
public void runOpMode() throws InterruptedException {
testMotor = hardwareMap.get(DcMotor.class, "testMotor");
testMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
testMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
sleep(10000);
testMotor.setPower(0);
}
}