11-20-2014 09:06 PM
Hello, we need help with our programming. We want to limit the movement of a tetrix motor to stop when a "touch sensor" is pressed. We have programmed according to what we think is correct. But the program runs choppy, like buffering or stalling.
We want to put a second limit swith for the same motor so it will limit the movement when going "reverse". Our question is do we have to create 2 separate cases outside the BUTTON loop for each PORT, or can we just use an OR for PORT3 or PORT4?
Thanks for any help.
11-21-2014 10:38 AM
Hello 9419,
Your program looks pretty good to me. I don't think you want to be feeding the watchdog timer every iteration of the loop.
You should probably try to feed the watchdog timer about once every two seconds. You can do this by setting up a loop in parallel with the main loop which just feeds the watchdog.