These links may help Stepper Motor Basics Simple Stepper Code
also look up the AccelStepper library
...R