Accelstepper moving forward

Hey,

For a schoolproject i need to make a steppermotor move forward using Accelstepper.

the trick is the accelstepper needs to move forward when a button is pressed and it needs to stop when the button is released.

does anybody have examples on how to do this?

Hi,
Have you had a look at the examples in the IDE, under the Accelstepper library.

That would be a good place to start.

What stepper motor are you going to use?

Thanks.. Tom... :slight_smile:

Hey tom,

Im using a NEMA-17 stepper motor with a easydrive driver.

YT,

Dural

These links may be of interest
Stepper Motor Basics
Simple Stepper Code

Post a link to the datasheet for your stepper driver.

And, as @TomGeorge has said, try the examples that come with the AccelStepper library.

...R

Hey robin,

Could you post a link of the examples?

Easy Driver stepper motor driver v4,4 is the version im using.

Kind regards,

Dural

Hi,
Do you have the Arduino IDE loaded on your computer?
If so, when it opens, select Files, Examples and scroll through to find Accelstepper.


Tom... :slight_smile:

sdural12:
Could you post a link of the examples?

If you have downloaded and installed the AccelsStepper library the examples will be included with it. Also look on the AccelStepper website.

...R

Hey,

Could u maybe demonstrate me how to use this function in code:
AccelStepper:: AccelStepper ( void()() forward),
(void(
)() backward )

sdural12:
Hey,

Could u maybe demonstrate me how to use this function in code:
AccelStepper:: AccelStepper ( void()() forward),
(void(
)() backward )

Have you tried one of the examples from the AccelStepper library? That should be your starting point. Don't move on until you understand the code in the example.

...R