View Single Post
  #10   Spotlight this post!  
Unread 17-02-2014, 01:25
om_nom_nom om_nom_nom is offline
Registered User
AKA: Nam
FRC #0708 (Hardwired Fusion)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Pennsylvania
Posts: 6
om_nom_nom is an unknown quantity at this point
Re: Limit Switch Tripping

Like other people have said, you'll want to trip the limit switch as it passes right before the endpoint, but not at the end point. Momentum should carry it over a bit if you have your motor controllers set to coast, and you can set a timer of some sort to count before it goes backwards. As for what material to use to trip it, try a decently thick zip tie/ wire tie.

Code-wise, it could look something like this in a CommandGroup:
Code:
addSequential(new MoveArmForwardUntilLimit());
addSequential(new WaitCommand(0.5));
addSequential(new MoveArmBackwardsUntilLimit());
Reply With Quote