Learn how many steps do stepper motor

Hello ... iam new in world of Arduino and need help

I need a skech which would move stepper motor left and right.
I need 2 buttons to learn how many revolutions must be done right and left.
and a third button to start the learned movements.

I have Arduino NANO and EasyDriver for driving stepper motor.

Peter

I need 2 buttons to learn how many revolutions must be done right and left.

I don't understand that sentence, can you please explain.

You want one switch to make the stepper step once clockwise, and one switch to make the stepper step once counterclockwise?

Or, do you want the stepper to continue stepping clockwise until it trips one switch, and then step counterclockwise until it trips the other switch?

Once you have the requirements clear, the code is trivial, as long as the hardware is wired correctly.

steling:
I need 2 buttons to learn how many revolutions must be done right and left.
and a third button to start the learned movements.

Perhaps you mean that you press buttonA 10 times for 10 steps clockwise (or buttonB 8 times for 8 steps counter clockwise) and then press buttonC to make the steps happen.

This would be easy to code but it is a very unreliable way to get input from a human - it is very easy to lose count of how many times the button is pressed - and there is no way to correct mistakes.

...R