# Indiviual motor test and setting motor directions

**URL:** <https://discuss.bluerobotics.com/t/indiviual-motor-test-and-setting-motor-directions/12473>\
**Category:** ArduSub\
**Tags:** pymavlink\
**Created:** [July 5, 2022, 5:30pm UTC](https://discuss.bluerobotics.com/t/indiviual-motor-test-and-setting-motor-directions/12473 "2022-07-05T17:30:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Efe](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@Efe](https://discuss.bluerobotics.com/u/Efe)\
**Post date:** [July 5, 2022, 5:30pm UTC](https://discuss.bluerobotics.com/t/indiviual-motor-test-and-setting-motor-directions/12473/1 "2022-07-05T17:30:49Z")

</div>

Hi there!  
I want to do a motor test window just like the one inside QGC. I am using pymavlink and I found a command called MAV\_CMD\_DO\_MOTOR\_TEST. I tried to use it but it seems like it doesnt affect anything. Are there some initialization I should do before sending those commands? Here is my command sending code.

 ![Screenshot_20220705-172619_GitHub](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/c/cdc94962e2c55329f0f18950fa5cdddf5beb557c.jpeg)  
And for example if I send a command with value %50 will the thruster stop or with %0 value will it turn reverse?

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [July 8, 2022, 8:39am UTC](https://discuss.bluerobotics.com/t/indiviual-motor-test-and-setting-motor-directions/12473/2 "2022-07-08T08:39:46Z")

</div>

Hi @Efe,

I haven’t tried sending motor test commands directly via MAVLink before, and unfortunately can’t test it at the moment. I would recommend looking into

1. the specifics of [`MAV_CMD_DO_MOTOR_TEST`](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_MOTOR_TEST)
2. [how motor testing is implemented in ArduSub](https://github.com/ArduPilot/ardupilot/search?q=motor+test)
3. [how motor testing is implemented in QGroundControl](https://github.com/mavlink/qgroundcontrol/search?q=motor+test&type=commits)
  - [this](https://github.com/mavlink/qgroundcontrol/blob/master/src/Vehicle/Vehicle.cc#L3425) may be relevant

4. how to more completely implement the [MAVLink Command Protocol](https://mavlink.io/en/services/command.html)
  - complex commands may require more than just sending the command initially
