Stepper motor Potentiometer tutorial for step/dir pins

If that's the code you are using then it looks like you are still not in dir /step mode of the stepper driver.

All you need is :

Stepper stepper (STEPS,8,9);  dir/step