Creating Simple Commands¶
This documentation describes the use of the legacy command-based library. While this documentation has been preserved to help teams that have yet to do so, teams are strongly encouraged to migrate to the new command-based library.
This article describes the basic format of a Command and walks through an example of creating a command to drive your robot with Joysticks.
Basic Command Format¶
To implement a command, a number of methods are overridden from the WPILib Command class. Most of the methods are boiler plate and can often be ignored, but are there for maximum flexibility when you need it. There a number of parts to this basic command class:
Simple Command Example¶
This example illustrates a simple command that will drive the robot using tank drive with values provided by the joysticks.