Search documentation of bb

# BB.Command.Arm (bb v0.8.0)

View Source

Standard command handler for arming a robot.

When executed from the `:disarmed` state, this command arms the robot via `BB.Safety.Controller`, making it ready to accept motion commands.

## Usage

Add to your robot's command definitions:

    commands do
      command :arm do
        handler BB.Command.Arm
        allowed_states [:disarmed]
      end
    end

Then execute:

    {:ok, task} = MyRobot.arm()
    {:ok, :armed} = Task.await(task)