Version 1 (modified by 5 years ago) (diff) | ,
---|
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.
Attachments (5)
-
Constants.java (1020 bytes) - added by 5 years ago.
Constants defining device addresses and connections
-
RobotContainer.java (2.3 KB) - added by 5 years ago.
Contains the subsystems of the robot and binds commands to controller inputs
-
OpenCommand.java (1.6 KB) - added by 5 years ago.
Open command moves servo to far left position
-
CloseCommand.java (1.5 KB) - added by 5 years ago.
Close command moves servo to far left position
-
ServoSubsystem.java (1.1 KB) - added by 5 years ago.
Servo Subsystem models the physical servo motor and provides methods to control it
Download all attachments as: .zip