'dirPin' cannot be used as a function

This is a declaration, not a function call.

That crap makes the Arduino move the stepper, bypassing the stepper object, for 10 seconds.

Of course, the blocking nature will make the Arduino responsive as a brick for the same time,
screwing up the operation of ezbutton.

I call that function crap, because

  • its name has no connection to its function
  • it uses only global variables to control its operation
  • the index of the for loop is signed, controlling a count
  • significant delays are used
  • the function is blocking
  • the formatting is abysmal