Quote:
Originally Posted by Alan Anderson
Here's how I would do it. This code can go in either Teleop or one of the Periodic Task loops.
The part with a green right-facing feedback node and a "greater than" is a standard LabVIEW idiom for getting a single TRUE pulse when a button is first pressed.
The part at the top left is computing a boolean output saying whether or not the current tick count has reached a saved value, and setting that value to 500 ms in the future when it gets the "button has just been pressed" signal.
|
ok, so next question is when we release button A we want the motor to go in the opposite direction for 5 seconds and stop. How would I do that?