wiki:ControlSystems/SoftwareTeam/Training/GettingStarted/ServoMotor/Example2

Most advanced teams use the Command Framework for their robot programming because it provides a powerful paradigm for breaking up the many robot control features. Subsystems represent robot hardware and Commands represent complex actions performed using that hardware.

See the attached files for an example of a program that has commands to open and close something using a servo motor. The open and close commands are bound to the X and Y buttons on a game controller.

Start with a Command template program and:

  1. In the subsystems folder, delete the example subsystem and add the attached files:
  1. In the commands folder, delete the example command and add the attached files:
  1. Replace the files with the attached versions:

Notice that Main.java and Robot.java are unchanged; their behavior is generic; you define the robot behavior through adding subsystems, commands, and binding controls to the commands.

Last modified 16 months ago Last modified on Jan 28, 2020, 11:50:21 PM

Attachments (5)

Download all attachments as: .zip