Skip to main content

Tutorial 02: Enable and Read Status

Prerequisites

Motor States Overview

Motor control follows a state machine:
  • DISABLED: Motor windings are not powered, shaft can rotate freely
  • ENABLED: Motor is powered and can respond to control commands

Basic Enable/Disable

Using Python

Using CLI

Enable All Motors

When controlling multiple motors, enable them together:

Reading Motor State

State Fields

The MotorState dataclass contains:

Basic State Reading

State Reading with Retry

Since feedback is asynchronous, implement retry logic:

Continuous State Monitoring

Monitor Loop Pattern

Multi-Motor Monitoring

Understanding poll_feedback_once()

Background Polling

Since v0.3.3, including current v0.5.0, the SDK uses background polling by default. You typically don’t need to call poll_feedback_once().

Manual Polling (Legacy/Optional)

For backward compatibility or deterministic timing:

Status Code Interpretation

Damiao Status Codes

Handling Errors

Temperature Monitoring

Implement continuous temperature monitoring:

Complete Example

Next Steps