gabbyshimoni icon

Nema17wTB6600

gabbyshimoni | PRO | 01/27/20 08:14:40 AM UTC | 0 ⭐ | 327 👁️ | Never ⏰ | []
text |

510 B

|

None

|

0 👍

/

0 👎

#include <AccelStepper.h>
  // Define a stepper motor 1 for arduino 
// direction Digital 9 (CW), pulses Digital 8 (CLK)
AccelStepper stepper(1, 8, 9);
void setup()
{  
  // Change these to suit your stepper if you want
  stepper.setMaxSpeed(1000);//1100
  stepper.setAcceleration(1100);
  stepper.moveTo(2000);
}
 void loop()
{
    // If at the end of travel go to the other end
    if (stepper.distanceToGo() == 0){
      stepper.moveTo( -stepper.currentPosition() );
    }
     stepper.run();
}

Comments