View Single Post
  #2   Spotlight this post!  
Unread 12-02-2013, 09:24
Jefferson Jefferson is offline
Registered User
AKA: Jeff Clements
FRC #0016 (Bomb Squad)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Mountain Home, AR
Posts: 257
Jefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant future
Re: Command Based Robot Limit Switch Help

Without knowing the details, let me see if I can help you get started.

It sounds like you expect everything to run in sequence, so would suggest a command group with each of the these steps added sequentially. The command group will be tied to the joystick button "whenPressed."

Create commands that will run the arm at a set speed in the direction you want. In the "IsFinished" function, create an if statement using the limit switch input so it will return true when the limit switch is made. This will end the current command and kick off the next one in the group.

Review the screensteplive documentation on how to create the commands and command groups.

Also, you might want to create a default command for the subsystem that does nothing. it will revert to this command when it is done with the command group.
Reply With Quote