|
Re: Using a limit switch to limit motion
EDIT: Please ignore my comments below, they DO NOT apply to Vex, only to FRC. Thanks to Alan for pointing out my error.
All of these methods work well. Each has it's own advantages, but......
For the sake of sheer convenience, the default code already has built into it, motor limit switch inputs. If you simply set a motor to 127 when it hits the limit, you will never be able to back it out until you power down. So, the limits in code prevent the motor from turning in one direction, while allowing motion in the other. There is a pair of limits for each motor, one for each direction. All you need to do is connect a limit switch to the correct digital input and position the switch where it is needed.
These are documented in one of the IFI manuals for the RC/OI. Get all of the manuals when you go to IFI, they are well worth it!
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Last edited by billbo911 : 18-12-2007 at 11:29.
Reason: I missed a very important point. The question is for Vex.
|