Using MeStepper Library to give consecutive commands to stepper motors


#1

I’m using the MakeBlock XY plotter kit for university research and I’m trying to run the stepper motors using the MeStepper library to random positions for long periods of time (~1 hour or more) to test the plotters robustness. I’m trying to use a loop to continuously send commands to the motors but I am not sure what is the best way to. I am a mechanical engineering major so electronics/coding are not my strong suit. Any help or advice would be greatly appreciated!!!

I’ve tried a for loop such as the image shown below to get my stepper to just move back and forth; however the motor will only run once when my index is at 99.

I’ve also tried using the runToNewPosition method but with consecutive commands, the motors sound like they’re jamming.


#2