Tutorial 02: Enable and Read Status
Prerequisites
- Completed Tutorial 01: Scan and Identify
- Know your motor_id and feedback_id
- Motor powered on and connected
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
TheMotorState 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 callpoll_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
- Tutorial 03: Mode Switch and Control - Send control commands
- MotorState API - State dataclass reference
- Motor API - Full motor API