View Single Post
  #1   Spotlight this post!  
Unread 15-03-2009, 17:42
Shivang1923 Shivang1923 is offline
I make robot go VROOM VROOM!
FRC #1923 (MidKnight Inventors)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2008
Location: West Windsor, NJ
Posts: 38
Shivang1923 has a spectacular aura aboutShivang1923 has a spectacular aura about
Re: Programming toggle switches to DS for different autonomous routines?

Quote:
Originally Posted by grosh View Post
We have the Get SwitchVI in place now in "other""default", thanks Shivang1923. How did I get the selected autonomous mode to be read in the autonomous VI. We have found a few CD threads on this topic, but they are written for the advanced mode. We are using Basic mode. Is this possible in Basic or are we not finding the right threads?

Thanks
ok try something along these lines

i am assuming you guys changed the vi to match your button inputs
the output of the GetSwitchVI is a number
the number is counted in binary depending on the switch: so if the first switch is true, then the number is 1, if the second then it is 2 if first AND second then 3 if none then 0.

there is a global variable called robot data. If you have watched the tipjar videos from lvmastery.com, you would know how to place more 'data(for lack of the proper term =P)' into the global variable Robot Data. place just a number indicator into there.

in autonomous independent vi, unbundle the global, take the number (again, the videos from lvmastery tipjar will teach you this.) and wire it into a case structure. Then inside each of the cases, put what autonomous code you want running into it.
Reply With Quote