Hello everyone. I was wondering how you can change the rpm of a stepper motor in the middle of the code without some sort of input device. Is there anyway to hard code in the rpm of the motor and then change it? I tried using the setSpeed function and setting the rpm as a variable so i could change it but that did not work.
Show code. Link to libs used.
how you can change the rpm of a stepper motor in the middle of the code without some sort of input device.
What are the conditions which indicate a change of speed is required. Time? Position? Phase of the moon?
I am trying to change it after a certain amount of time.
Please show the code.
but that did not work.
In addition to all the other replies asking for more detail, please explain this in greater detail.
If all else fails, explain what your expected result would be, and how the actual result differed from that.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Please post your code and use code tags as instructed in the link above.
What model Arduino are you using?
Very basic concepts...
Steppers aren't controlled by their RPM.
We drive steppers using direction & step pulses - or in your cases steps per (sec/min) etc.
Different motors will have a different number of steps per revolution - so all the above comes into play.
The stepper driver you're using will also affect how you push the motor.
Also- be prepared for dropped/skipped steps if you're stepping too fast, or the load is too great.
This can be reduced by ramping your speed up & down at the endfs of travel.