View Single Post
  #2   Spotlight this post!  
Unread 30-10-2014, 10:16
Drakxii Drakxii is offline
Registered User
FRC #4131 (Iron Patriots)
Team Role: Mentor
 
Join Date: May 2014
Rookie Year: 2012
Location: United States
Posts: 120
Drakxii is just really niceDrakxii is just really niceDrakxii is just really niceDrakxii is just really niceDrakxii is just really nice
Re: Turning a button into a switch

Create a variable that holds the mode that robot is in. (IE 1 = tall mode, 2 = short mode, etc...) Then when you hit the button it would run a set if statements to check what mode it is in and switch that variable to the other value(s). Finally the rest of the code would look to that variable which would determine the mode it is in.