Is there a way to stop a motor and have it brake instead of float?
Announcement
Collapse
No announcement yet.
stopping a motor
Collapse
X
-
You can put that in with your other hardware initialization. So you'd have something like:
Code:motorName = opMode.hardwareMap.get(DcMotor.class, "motorName"); motorName.setDirection(DcMotor.Direction.FORWARD); motorName.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER); motorName.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
Comment
Comment