This bypasses the AccelStepper library. If you want to enable the stepper with the AccelStepper library you should use: stepper.enableOutputs();. To disable the stepper you should use stepper.disableOutputs();
Thank you johnwasser, I will try that. Having said that, I have read that stepper.runToPosition() should enable the outputs and that stepper.enableOutputs() should only be used if the stepper has been disabled by stepper.disableOutputs()
Mike
I don't see that in the documentation. The documentation implies that if you call disableOutputs() you have to call enableOutputs() before you can move.
Thanks again, that worked well and you have helped to fill in a bit of my misunderstanding.
For info, where I failed is that I thought that " ....Called automatically by the constructor. If the enable Pin is defined, sets it to OUTPUT mode and sets the pin to enabled." meant that it would be enabled implicitly.
That won't do much good since you can't call "stepper.setEnablePin(9);" or "stepper.setPinsInverted(false, false, true);" until AFTER the 'stepper' object is constructed.
For safety I would add: stepper.enableOutputs();
after: