The idea is to control one motor to move an object along a track at a speed determined by a potentiometer. Additionally i want to have two buttons and two limit switches, such that;
Button 1: Start/Stop
Button 2: Reverse direction every time its pressed
Limit switch: When the switch is hit, it reverses the direction of travel.
Any ideas on what approach I should take to the code?
(PS using a Nema-17 59Ncm motor, and I haven't decided on the stepper controller yet).