Controlling a stepper motor with the control of a button

forrestcollier:
I have 3 questions:

  1. Can I program a stepper motor to turn a defined number of degrees (or steps) at the press of a button?

  2. Can I program the stepper motor to turn back to its original starting position at the next press of the button?

  3. Can I measure the angular displacement (or # of steps) of the stepper motor over time?

Thanks

  1. Yes
  2. See #1
  3. See #2

What have you tried?