#include <AccelStepper.h>
AccelStepper stepper(AccelStepper::DRIVER, 8, 9);
uint32_t start_time = 0;
void setup()
{
Serial.begin(9600);
while(!Serial);
Serial.println("starting test");
stepper.setMaxSpeed(999999);
stepper.setSpeed(999999);
start_time = millis();
}
void loop()
{
stepper.runSpeed();
if (stepper.currentPosition() == 1000000)
Serial.println(millis() - start_time);
}#include <AccelStepper.h>
AccelStepper stepper(AccelStepper::DRIVER, 8, 9);
uint32_t start_time = 0;
void setup()
{
Serial.begin(9600);
while(!Serial);
Serial.println("starting test");
stepper.setMaxSpeed(999999);
stepper.setAcceleration(999999);
stepper.moveTo(1000000);
start_time = millis();
}
void loop()
{
if (!stepper.run()) {
Serial.println(millis() - start_time);
while(1);
}
}What a great test Gregor! I wonder if the top speeds for various devices should be in the docs? Or maybe the sketch could be one of the examples in the software bundle?
sandy noble
--
You received this message because you are subscribed to the Google Groups "accelstepper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to accelstepper...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I used ',' as the decimal.
The speed using run() was 16213 Steps/second, a little typo caused by tiredness ;-)
Thanks!