Skip to main content

Quickstart

Prerequisites

Before starting, ensure:
  • motorbridge installed (pip install motorbridge)
  • CAN interface configured (see Install)
  • Motor connected and powered on
  • Known motor ID and feedback ID

30-Second Minimal Example

Step-by-Step Walkthrough

1. Import the SDK

2. Create Controller

The controller manages the CAN interface and motor handles:

3. Add Motor

Create a motor handle with vendor-specific parameters:
motor_id and feedback_id are motor-specific. Use motorbridge-cli scan to discover them.

4. Enable and Set Mode

5. Send Commands

6. Read Motor State

7. Clean Up

Complete Control Loop Example

Multi-Motor Control

Error Handling

CLI Quick Reference

After pip install, use the CLI for quick testing:

Vendor-Specific Examples

Next Steps