Use pins 8 or 9 for step and direction when controlling Pololu DRV8834?

Hello all, I am trying to cobble together some code to control my barndoor tracker.

Looking at Robin2's simple sketch I see he assigns direction to pin 9 and step to pin 8.

 byte directionPin = 9;
byte stepPin = 8;

However when I look at an example micro-stepping sketch written by laurb9 in the Pololu library I see he assigns direction to pin 8 and step to pin 9.

// All the wires needed for full functionality
#define DIR 8
#define STEP 9

Does it matter which one I use? I will be controlling a Pololu DRV8834 at 1/32 micro-stepping.

Also should I be using "#define" instead of "byte" if using the Pololu stepper driver library?

The syntax for a #define and declaring a variable as a byte is quite different.

Which way should a newbie go?

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:

Static const vs define vs enum

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.

Much appreciated, have a good day.

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:

Static const vs define vs enum

OK thank you I will check it out.