> For the complete documentation index, see [llms.txt](https://tk233.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tk233.gitbook.io/notes/motor-control/mjbots-moteus-setup.md).

# MJBOTS Moteus setup

### Install Python Package

```bash
pip3 install moteus_gui
```

### Calibration

With motor controller powered and CAN connected to USB adapter, run

```bash
py -m moteus.moteus_tool --target 1 --calibrate
```

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-75430167a4abb720a8aa3ba894b79b60e72ef781%2Fimage.png?alt=media)

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-8f5f0a0eb41e519a4b3e59dc882cbd4a52d1260e%2Fimage.png?alt=media)

### Position Mode

run

```bash
py -m moteus_gui.tview --devices=1
```

Set `servopos` limits to appropriate values

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-97b1459ce15d7888676a85eb84c4053526976e99%2Fimage.png?alt=media)

And set

![](https://1287130752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvVJ0h2a4qMIhB1I8GdV8%2Fuploads%2Fgit-blob-daf4ce7af581be346874ce70ef8e509d498ee90b%2Fimage.png?alt=media)

```bash
conf set servopos.position_min -3
conf set servopos.position_max 0.5
conf set servo.max_current_A 5
```

```bash
conf set servo.default_accel_limit 1
conf set servo.max_velocity 5
```

To save config to EEPROM:

```bash
conf write
```

and to read from:

```bash
conf load
```

```bash
d pos 0 0 0.1
```

```bash
d stop
```
