Hello,
an update from poster:
I have started my journey into the accelStepper Library and I have successfully written codes to rotate two of my Nema 23 Stepper motors simultaneously.
To further elaborate on the necessary functions I need; I am looking for one motor to be used to traverse an object linearly, i would like for there to be a home position and for the object to return there upon completion of its traversing. The second motor is used to push a liquid out of the object, therefore i would like it to maintain a constant pressure.
Here is my current code:
#include <AccelStepper.h>
AccelStepper mystepper1(1,8,9);
AccelStepper mystepper2(1,4,5);
void setup()
{
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Stepper test!");
mystepper1.setMaxSpeed(2000); //20000 steps/second max
mystepper1.setSpeed(63.33); //19 rpm
mystepper2.setMaxSpeed(2000); //20000 steps/second max
mystepper2.setSpeed(63.33); //19 rpm
}
void loop()
{
mystepper1.runSpeed();
mystepper2.runSpeed();
}
Unfortunately it still seems like the motors RPM is far less than 19 RPM
What are some possible causes for this?
Secondly, Could someone provide some insight into the kind of code and logic I need to look into to achieve my functionality.
Thank you in advance!!