|
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.
|