I think you first need to deal with what people have said about the use of the pulseIn() function. I have never used it myself, but if it blocks the Arduino for a greater time than the interval between steps it would not be suitable in a one step at a time program.
If you were using a simple DC motor this would not be a problem.
...R
PS ... did you see the change I made to my previous Reply?