Announcement

Collapse
No announcement yet.

stopping a motor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 3805Mentor
    replied
    To clarify braking, it slows the motor rapidly, it does not hold the motor in position once stopped.

    Leave a comment:


  • thensley
    replied
    FLARE Thank You!

    Leave a comment:


  • FLARE
    replied
    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);

    Leave a comment:


  • thensley
    replied
    FLARE would we put that in hardware or in the op mode?

    Leave a comment:


  • thensley
    replied
    Would we put that in the hardware program or in the op mode itself?

    Leave a comment:


  • FLARE
    replied
    motorName.setZeroPowerBehavior(DcMotor.ZeroPowerBe havior.BRAKE); -- This will "put the brakes on" with motorName.setPower(0)

    motorName.setZeroPowerBehavior(DcMotor.ZeroPowerBe havior.FLOAT); -- This will coast with motorName.setPower(0)

    Leave a comment:


  • FTC9912
    replied
    What are you using in your code? I would think the easiest is to set the power to zero. Here are few suggestions.
    // stop motors with brakes on.
    motorA.stop(); or motorA. setPower(0);

    Leave a comment:


  • thensley
    started a topic stopping a motor

    stopping a motor

    Is there a way to stop a motor and have it brake instead of float?
Working...
X