controlling pwm to move stepper motor at a specified distance

Hello guys ! i am a newbie…I recently started working a project in which the stepper motor has to move certain distance and angle that is feeded into serial monitor…the problem is how do i adjust pwm so that the motor moves to the specified distance in millimeter…

stepper pwm.pde (1.25 KB)

The usually used stepper motors are controlled by pwm.
Usual Dir is set and Step is pulsed on the driver board.

Railroader:
The usually used stepper motors are controlled by pwm.

I believe that was intended to be
"The usually used stepper motors are NOT controlled by pwm."

This Simple Stepper Code should give you a good sense of how stepper motors are controlled. You vary the speed by changing the value of millisBetweenSteps.

...R
Stepper Motor Basics

Robin2:
I believe that was intended to be
"The usually used stepper motors are NOT controlled by pwm."

This Simple Stepper Code should give you a good sense of how stepper motors are controlled. You vary the speed by changing the value of millisBetweenSteps.

...R
Stepper Motor Basics

Thanks! Embaricing missprint.