waspinator / AccelStepper

Fork of AccelStepper
http://www.airspayce.com/mikem/arduino/AccelStepper/
Other
146 stars 86 forks source link

Simple example #24

Open guestisp opened 1 year ago

guestisp commented 1 year ago

Hi guys. This should move the stepper 100000 steps forward, in non-blocking mode, at speed 50, right ? Becaue it does nothing, only electrical noise from the stepper motor

    AccelStepper TestStepper(AccelStepper::DRIVER, STEP_PIN, DIR_PIN);

    TestStepper.setEnablePin(EN_PIN);
    TestStepper.enableOutputs();
    TestStepper.move(100000);
    TestStepper.setMaxSpeed(50*2);
    TestStepper.setSpeed(50);

    while ( TestStepper.runSpeedToPosition() ) {
      // .............
   }