(Solved)Steppermotor and serial.print and read combined

Shouldn't you have stepper.run() inside stepMotor() and nothing else.

Stepper.run() is what actually causes the steps to happen. Because this is a demo program very little happens in loop and there is no use putting stepper.run() there.

You seem to have chosen acceleration - that may interfere with what you are trying to do, take it out for now. And be sure to set the motor speed to match the step time that you want.

...R