I'm trying to create a time-lapse slider that will pan/tilt/translate a certain number of steps given a number of seconds. Essentially, the problem I'm trying to solve is:
In 'n' seconds, turn the motor 'm' steps.
And so, the question I'm trying to get answered is would there be a formula that can be used to determine the correct RPM value (where the RPM value is the argument in the setSpeed(RPM) function) such that the motor would turn 'm' steps in 'n' seconds?
For example, given:
int motorSteps = 100 // arbitrary steps for a motor
int time = 5; // seconds
int steps = 500; // steps or micro-steps?
// what is the correct formula for the rpm?
int rpm = (some formula here?)
Something helpful that I found was for the steps() function at 'Stepper - Arduino Reference'. It states that setting a speed to '1 RPM' and calling 'step(100)' on a '100-step' motor would cause the motor to turn 100-steps in 60 seconds. I also came across a thread (http://forum.arduino.cc/index.php/topic,184563.0.html), but I'm not sure if it is 100% related to mine. I've been trying to find some sort of relationship between these variables with no luck, and I also keep on coming to dead-ends through Google. If any of you guys have any information, it'd be appreciated.