I am looking for a nudge in the right direction on a project. I built a rig using a stepper motor to rotate (pan) a camera. I had it hard wired (10m of cable) to two buttons one for clockwise and one for anticlockwise rotation. All works well.
I wanted to lose the wire so bought a 4 channel remote controller. my problem is that the controller "pulses" from High to Low, so now my stepper motor is very jerky as there is no longer a continuous HIGH while the button is pushed.
I tried to use a Do While loop so that the motor would start to run and keep going until the opposite button is pressed (i.e. if I press clockwise button once the motor should keep going until anti clockwise button is pressed), but although motor runs it does not stop.
How can I set it up so that when the clockwise button is pushed and the input pin goes high for the first time (remember it pulses) the motor runs until the anticlockwise button is pressed?
what strategy should I adopt, I have looked hard for a solution including Switch Case, Do While, etc but I think I may have the wrong approach.