# AccelStepper moveTo not changing direction

**URL:** <https://forum.arduino.cc/t/accelstepper-moveto-not-changing-direction/1171791>\
**Category:** Motors, Mechanics, Power and CNC\
**Created:** [September 24, 2023, 9:55pm UTC](https://forum.arduino.cc/t/accelstepper-moveto-not-changing-direction/1171791 "2023-09-24T21:55:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shydevil](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/shydevil/32/994495_2.png) [@shydevil](https://forum.arduino.cc/u/shydevil)\
**Post date:** [September 24, 2023, 9:55pm UTC](https://forum.arduino.cc/t/accelstepper-moveto-not-changing-direction/1171791/1 "2023-09-24T21:55:52Z")

</div>

Hello my friends!  
im using the accelstepper library and for some odd reason its not changing the directions. I checked the steps for setting the moveTo target and distance to go. both is correct, and both change between positive and negative numbers depending on the direction i wanna go, i checked the wiring its correct too and it worked in the past so i wonder why it isnt working now.

Its a lot of code so i dont know if i should post it here, but in any case, i posted a pastebin: [#include \<AccelStepper.h\>#include \<MultiStepper.h\>#include \<limits.h\>A - Pastebin.com](https://pastebin.com/KT0RYxqv)

---

<div class="post-metadata">

**Author:** ![shydevil](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/shydevil/32/994495_2.png) [@shydevil](https://forum.arduino.cc/u/shydevil)\
**Post date:** [September 24, 2023, 10:01pm UTC](https://forum.arduino.cc/t/accelstepper-moveto-not-changing-direction/1171791/2 "2023-09-24T22:01:59Z")

</div>

Okay so i might've found the issue. The small metal pin on the GPIO Cable was all way the in, but not making any connection apparently. I plugged it in half way where i could feel the most resistence and it seemed to have worked now.

Maybe cheap cables 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [September 24, 2023, 11:05pm UTC](https://forum.arduino.cc/t/accelstepper-moveto-not-changing-direction/1171791/3 "2023-09-24T23:05:17Z")

</div>

Congrats! Just talking to somebody, the fault is found. I've experienced that more than once in life.

---

<div class="post-metadata">

**Author:** ![shydevil](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/shydevil/32/994495_2.png) [@shydevil](https://forum.arduino.cc/u/shydevil)\
**Post date:** [September 24, 2023, 11:20pm UTC](https://forum.arduino.cc/t/accelstepper-moveto-not-changing-direction/1171791/4 "2023-09-24T23:20:49Z")

</div>

happens a lot when programming

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [September 24, 2023, 11:36pm UTC](https://forum.arduino.cc/t/accelstepper-moveto-not-changing-direction/1171791/5 "2023-09-24T23:36:18Z")

</div>

Everything and anything is possible. Once received a new stepper motor looking fully okey, but... One wire was broken but no damage to the insulation....

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [March 22, 2024, 11:36pm UTC](https://forum.arduino.cc/t/accelstepper-moveto-not-changing-direction/1171791/6 "2024-03-22T23:36:48Z")

</div>

Closed on March 22, 2024, 11:36pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
