View Single Post
  #6   Spotlight this post!  
Unread 07-02-2015, 15:01
itwasntme455 itwasntme455 is offline
Registered User
AKA: Brandon
FRC #4791 (Pandroids)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2013
Location: South Bend, Indiana
Posts: 26
itwasntme455 is an unknown quantity at this point
Re: motor programming

Quote:
Originally Posted by Alan Anderson View Post
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?
Reply With Quote