View Single Post
  #7   Spotlight this post!  
Unread 05-02-2013, 11:48
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Multiple Autonomous Modes

I've generally used an analog multiplexed switch (e.g. a 12-position rotary switch with a resistor between each terminal, +5 on one side, gnd on the other, and the wiper as signal) for autonomous modes.

I read the input from the source (currently a uHID) then do some math to end up with an integer number, which I use to find the correct routine in an array. Since we store the routine as a string filename, I also send that filename back to the dashboard as the low priority string (the 'old style' binary string dashboard system).

I like keeping the robot in the feedback loop. The drive team occasionally complains about not being able to see the selected mode until the robot is booted up, but requiring the robot to confirm the selected mode is a much more failsafe option than selecting it and hoping the robot received it (IMO).
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack