View Single Post
  #1   Spotlight this post!  
Unread 24-02-2013, 13:56
ArzaanK ArzaanK is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Mississauga, Ontario, Canada
Posts: 40
ArzaanK is an unknown quantity at this point
Shooter Motors to run continuously.

I am a relatively new programmer on Team 1325, and one of my tasks is to write the code for our shooter. Currently in my code, when a button is pressed, the motors of the shooter turn on, at the speed of the axis of the joystick, and when the button is released, the motors stop. This works, but I would like to have some code that does the following;

When a button is pressed, the motors start, and the motors continue to run even if that button is released.

When another button is pressed stop the motors of the shooter.

I thought about using a while loop earlier to accomplish this but I read somewhere that while loops should not be used in the TeleOp section of the code. I also know that a feedback node could be used to accomplish what I want to do, but I am not sure where to start.

Any help would be greatly appreciated.

Here is the code that I currently have:
Reply With Quote