Robin's sketch example is pretty close to what I want to achieve, maybe with the addition of a couple of limit switches and I would like to run it at two different speeds.
Perhaps I am complicating matters with the Pololu stepper library, I just thought it might be helpful.
I would say, as a newbie, don't worry about it. It ends up being the same datatype in cases where you are just defining pins. If you want to know more, I would direct you to this SO question:
Neither sketch is telling you what pins to use for what purpose. Both are saying that IF you have connected something to a pin that can be used to control the direction, this is the pin that it is connected to. Make that value correspond to the correct pin.
Both are saying that IF you have connected something to a pin that can be used to control the speed, this is the pin that it is connected to. Make that value correspond to the correct pin.
What I am getting at is that pin 9 on the Arduino board is labeled PWM, while the other isn't. I' just wondering if pin 9 is the one I need to assign to the " step" function of the motor driver?
Number_5:
What I am getting at is that pin 9 on the Arduino board is labeled PWM, while the other isn't. I' just wondering if pin 9 is the one I need to assign to the " step" function of the motor driver?
If you are driving a stepper motor, the step pin does not have to support PWM. If you are driving a regular electric motor, the speed pin does need to support PWM.
PaulS:
If you are driving a stepper motor, the step pin does not have to support PWM. If you are driving a regular electric motor, the speed pin does need to support PWM.
Thank you Paul, I suspected as much but wanted to understand before moving forward.
jjtjp:
I would say, as a newbie, don't worry about it. It ends up being the same datatype in cases where you are just defining pins. If you want to know more, I would direct you to this SO question: