Make an OpMode
Annotate the class with @TeleOp or @Autonomous and ensure the class extends LinearOpMode or similar.
Use a Motor
DcMotor motor = hardwareMap.get(DcMotor.class, "motor");
motor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
motor.setPower(1);
motor.setMode(DcMotor.RunMode.RUN_TO_POSITION);
motor.setTargetPosition(1000);
motor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);
motor.setVelocity(25.0);
var currentPos = motor.getCurrentPosition();
var currentVel = motor.getVelocity();
Use a Servo
Coming Soon!
Use a Servo (FTCLib)
Coming Soon!