Lesson 1: Motor Control¶
Goal / 目標¶
Understand motor numbering and control individual motors with PWM.
Motor Layout / モーター配置¶
API / 使用するAPI¶
| Function | Description |
|---|---|
ws::motor_set_duty(id, duty) |
Set motor duty (id=1-4, duty=0.0-1.0) |
ws::motor_set_all(duty) |
Set all motors to same duty |
ws::motor_stop_all() |
Stop all motors |
Steps / 手順¶
- Switch to this lesson:
sf lesson switch 1 - Spin motor 1 at 10% duty
- Verify which propeller spins (FR = front-right) / どのプロペラが回るか確認(FR = 右前)
- Try each motor to confirm numbering / 各モータを試して番号を確認
- WARNING / 注意: Hold the drone firmly! Do not exceed 15% duty! / 機体をしっかり押さえること!duty 15% を超えないこと!
Challenge / チャレンジ¶
Cycle through all 4 motors, spinning each for 2 seconds.