long interval = 1000000/2; step per second long interval = 100000/2; 10 step per second long interval = 1000/2; 1000 step per second // this is not true as it gives one revolution a second +-
Probably not the correct place to use PWM... a PWM signal to the driver will cause the motor to try and step at the PWM frequency. If you want to use PWM you would use PWM to each of the transistors on the driver to control the current to each phase.If you try to use Arduino PWM to drive a normal stepper motor driver the motor will try to step as 500Hz. PWM is a variable duty cycle - meaning it turns on and offm with the approx analog voltage being the ratio of 5V to 0V. so at 50% the voltage will be 5V half the time, and 0V half the time. Looks like a step signal to the driver.