View Single Post
  #5   Spotlight this post!  
Unread 30-01-2011, 10:56
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Multiple buttons on a single motor

I was right, what you want is easy.
Click image for larger version

Name:	button motor.jpg
Views:	35
Size:	15.8 KB
ID:	9888
The triangular "Select" functions might be unfamiliar. The help describes them this way:
Quote:
Returns the value wired to the t input or f input, depending on the value of s. If s is TRUE, this function returns the value wired to t. If s is FALSE, this function returns the value wired to f.
So when neither button is pressed, the motor is set to 0. When the forward button is pressed, the motor is set to 1 (full speed forward -- change the constant if you want some other speed). When only the reverse button is pressed, the motor is set to -1 (full speed reverse -- change it if you want).

Last edited by Alan Anderson : 30-01-2011 at 16:37. Reason: corrected the markup
Reply With Quote