|
Re: DIP switches for autonomous modes
Quote:
Originally Posted by billbo911
Another possibility is using a potentiometer and one analog input on the robot.
Theoretically you could have close to 5000 different autonomous options as I believe the analog inputs are 12 bit. (2^12=4096). Practically speaking, you would easily be able to have a couple per zone.
We have a pot on our robot this year that has 10 detented positions, but we are only using 4 modes. This allows us greater room for error in positioning the pot.
|
Another option is a multiplexed switch. You solder a resistor from each position to the position next to it, with GND on one end and +5 (or +3.3) on the other. The selector goes to SIG. If all of the resistors are the same value, each position is an even increment from the next and the switch clicks from position to position, more accurately than the potentiometer method.
__________________
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
|