View Single Post
  #4   Spotlight this post!  
Unread 13-02-2013, 08:04
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Command Based Robot Limit Switch Help

I know in Java you can activate commands based on button presses. You can also extend the Button class and override it's get() method to get the value of a limit switch. After that you fire a command when the "button" is pressed. I'd imagine you can do something similar in the C++ version. You just fire a command that tells the motor controller to stop.

If I'm reading this right the two limit switches are your two positions that you want the arm to stop at? So basically you press a button and the arm goes until it hits a limit switch, then on another button press it goes back to the original limit switch?
Reply With Quote