# Stepper motor

**URL:** https://mworks.discourse.group/t/stepper-motor/128
**Category:** Support
**Created:** [June 1, 2021, 12:44pm UTC](https://mworks.discourse.group/t/stepper-motor/128 "2021-06-01T12:44:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)
#### Post date: [June 1, 2021, 12:44pm UTC](https://mworks.discourse.group/t/stepper-motor/128/1 "2021-06-01T12:44:02Z")

</div>

Hi Chris,

Hope all is well. Have you ever had an application for MWorks requiring controlling a stepper motor, say, for a linear stage? We want to add this for our monkey training and I am wondering if there exists already a solution in that space you have worked with. Please let me know and any other thoughts you might have on it.

Thanks,  
-Mehrdad

---

<div class="post-metadata">

### Author: ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)
#### Post date: [June 1, 2021, 12:58pm UTC](https://mworks.discourse.group/t/stepper-motor/128/2 "2021-06-01T12:58:39Z")

</div>

Hi Mehrdad,

No, I haven’t worked with a stepper motor before.

If I were going to do so, I’d probably first try controlling one via an [Arduino](https://www.arduino.cc) board. There are Arduino libraries ([simple](https://www.arduino.cc/en/Reference/Stepper) and [advanced](https://www.arduino.cc/reference/en/libraries/accelstepper/)) for controlling stepper motors. There’s also a [proposed extension to the Firmata protocol](https://github.com/firmata/protocol/blob/master/accelStepperFirmata.md) that makes use of said libraries, so I could potentially add a stepper-control channel type to MWorks’ existing [Firmata interface](https://mworks.github.io/documentation/latest/components/firmata_device.html). On the other hand, it might be simpler and/or more amenable to your needs to run custom firmware on the Arduino device and communicate with it over serial via [Python actions](https://mworks.github.io/documentation/latest/components/run_python_file.html) in your MWorks experiment.

I’m sure there are other possibilities, but that’s where I’d start. I hope that helps!

Cheers,  
Chris

---

<div class="post-metadata">

### Author: ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)
#### Post date: [June 5, 2021, 11:41pm UTC](https://mworks.discourse.group/t/stepper-motor/128/3 "2021-06-05T23:41:17Z")

</div>

Thanks Chris!

-Mehrdad

---

<div class="post-metadata">

### Author: ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)
#### Post date: [July 19, 2022, 7:06pm UTC](https://mworks.discourse.group/t/stepper-motor/128/4 "2022-07-19T19:06:45Z")

</div>


