I’m trying to control a stepper (SparkFun ROB-10846) using the EasyDriver. This is for astrophotography, so the stepper motion needs to be very precise. The current code is below.
My issue is that the motor seems to run at discrete speeds. Speeds of 801-804 all turn at the exact same speed. 804-805 are the same as are 806-808.
Is there a way to get very precise speed control?
Thank you!
#include <AccelStepper.h>
AccelStepper stepper(4, 2, 3, 4, 5);
int spd = 805;
void setup()
{
Serial.begin(9600);
Serial.print(millis());
Serial.print(" ");
stepper.setMaxSpeed(spd);
stepper.setSpeed(spd);
Serial.println(stepper.currentPosition());
}
void loop()
{
stepper.runSpeed();
if (stepper.currentPosition() == 16000)
{
Serial.println(millis());
}
}