only use setSpeed() when you use runSpeed().
In the "move left" part of the code, you do not set a target for the stepper. use:
stepper1.moveTo(-pos);
Have a good trip Mike. Dennis, what values does the joystick return? I don't think I've seen the full set of code in this thread yet, what X_MIN and X_MAX are set to.
The problem has to be on your line
if ( (x - X_MIN) < 0) { //move left
Without knowing what the values of these bars are, I could only speculate about is happening, except that I guess that (x - X_MIN) is never less than 0.
The easiest way to diagnose this is to add some debug Serial.println()s into your code to see what those values really are, and watch the serial console.
Sn
--
You received this message because you are subscribed to the Google Groups "accelstepper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to accelstepper...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.