Command

What is it?

A command is a single action performed by the robot. Commands usually require at least one subsystem which they act with. After being started, a command runs for a period of time until either it is finished performing its task or it is interrupted. Interruptions can occur either when a command is canceled or when another command that requires the same command is run.

What does it mean for a command to require a subsystem?

Commands can require a subsystem using the requires() method of commands. When a command requires a subsystem, it claims exclusive control over that subsystem and will interrupt any other command that requires the same subsystem. This only works if all your commands properly require the subsystems that they use.

What are parameters and how are they used in a command?

Parameters are variables that are passed into a command to be used later. By adding parameters to your command, the parameters are defined in your command class as a variable of the same type. The arguments passed in by the parameters can then be used by methods inside of the command.

Properties

Requires
The subsystem that this command requires.
Button on SmartDashboard
Whether or not to automatically place a button on the SmartDashboard.
Parameters
Variables to be passed into the command. Data can be of types boolean, byte, int, long, double, or string.