Metadata-Version: 2.4
Name: motkin-pcb
Version: 1.1.1
Summary: usb driver for pico_dual_PMSM_BU79100G_DRV8316C
Author: Thomas Flayols
Author-email: thomas.flayols@laas.fr
Maintainer: Guilhem Saurel
Maintainer-email: guilhem.saurel@laas.fr
License: BSD-2-Clause
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib
Requires-Dist: pyserial
Requires-Dist: setuptools
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

# Python scripts

All demos and tools are in this python module.

```text
software/
    motkin_pcb/
        __init__.py
        client.py
        protocol.py
        demo_sine_position.py
        demo_motor_coupling.py
        demo_motor_tone.py
        monitor_zero_torque.py
        plot_current_step_response.py
        measure_host_timing.py
```

| Script | Purpose |
| --- | --- |
| `demo_sine_position.py` | Move both motors through a sinusoidal position trajectory. |
| `demo_motor_coupling.py` | Couple the two motors so each follows the other's motion. |
| `demo_motor_tone.py` | Generate an audible tone with alternating motor current. |
| `monitor_zero_torque.py` | Display motor state while continuously commanding zero torque. |
| `plot_current_step_response.py` | Apply a square-wave current target and plot the response. |
| `measure_host_timing.py` | Measure the Python command loop and USB echo latency. |

Place new controller scripts here and import the client with:

```python
from motkin_pcb import MotorUsbController
```

The client checks readiness and faults automatically in `initialize()` and
`update()`. A fault prints its cause and raises an error to stop the command loop.
See [the USB protocol](../firmware/USB_PROTOCOL.md) for the API and packet format.

Opening a serial connection uses the existing `pyserial` dependency. Plotting
also uses `matplotlib`.
