# `mix bb_so101.calibrate`
[🔗](https://github.com/beam-bots/bb_so101/blob/main/lib/mix/tasks/bb_so101.calibrate.ex#L5)

Calibrates servo range of motion by having the user manually move the arm
through its full range while tracking min/max positions for all joints.

## Usage

    mix bb_so101.calibrate PORT [OPTIONS]

## Arguments

  * `PORT` - Serial port (e.g., /dev/ttyUSB0 or /dev/ttyACM0)

## Options

  * `--baud-rate`, `-b` - Baud rate (default: 1000000)
  * `--dry-run`, `-n` - Show what would be done without writing offsets

## Process

1. Disables torque on ALL servos so you can move the arm freely
2. Move every joint through its FULL range of motion
3. The display shows live min/max tracking for each joint
4. Press Enter when done
5. Calculates mechanical center for each joint
6. Sets position_offset so center corresponds to 0 radians

## Example

    mix bb_so101.calibrate /dev/ttyUSB0
    mix bb_so101.calibrate /dev/ttyUSB0 --dry-run

---

*Consult [api-reference.md](api-reference.md) for complete listing*
