Recent Updates

  • PIDSubsystems use feedback to control the actuator and drive it to a particular position. In this example we use an elevator with a 10-turn potentiometer connected to it to give feedback on the height. The skeleton of the PIDSubsystem is generated by the RobotBuilder and we have to fill in the rest of the code to provide the potentiometer value and drive the motor with the output of the imbedded PIDController.

    Manual RobotBuilder
  • Updated on: Sep 12, 2014

    Writing the code for a command in C++

    Manual RobotBuilder
  • Updated on: Sep 12, 2014

    Writing the C++ code for a subsystem

    Manual RobotBuilder
  • Commands are easily tested by adding a button to the SmartDashboard to trigger the command. In this way, no integration with the rest of the robot program is necessary and commands can easily be independently tested. This is the easiest way to verify commands since with a single line of code in your program, a button can be created on the SmartDashboard that will run the command. These buttons can then be left in place to verify subsystems and command operations in the future.

    This has the added benefit of accommodating multiple programmers, each writing commands. As the code is checked into the main robot project, the commands can be individually tested.

    Manual RobotBuilder
  • Updated on: Sep 12, 2014

    Setting up the robot project

    The RobotBuilder program has some default properties that need to be set up so the generated program and other generated files work properly. This setup information is stored in the properties for robot description (the first line).

    Manual RobotBuilder
  • Running your benchtop testing program while tethered to the Driver Station via ethernet or USB cable will confirm the the program was successfully deployed and that the driver station and roboRIO are properly configured.

  • Updated on: Sep 06, 2014

    Pneumatics Control Module

    The Pneumatics Control Module (PCM) is a CAN-based device that provides complete control over the compressor and up to 8 solenoids per module. The PCM is integrated into WPILib through a series of classes that make it simple to use. The examples shown here are for Java programs, the C++ classes have the same names except for the method capitalization, following the same conventions as used throughout the rest of WPILib.

    Moving from the old Compressor and Solenoid classes should be fairly easy. The closed loop control of the Compressor and Pressure switch is handled by the PCM hardware and the Solenoids are handled by the upgraded Solenoid class that now controls the solenoid channels on the PCM.

    An additional PCM module can be used where the modules corresponding solenoids are differentiated by the module number in the constructors of the Solenoid and Compressor classes.

  • Commands and Subsystems each are created as classes. The plugin has built-in templates for both Commands and Subsystems to make it easier for you to add them to your program.

  • Updated on: Aug 07, 2014

    Creating a robot project

    Create a command-based robot project by using one of the template projects that are provided with the Eclipse plugins.

  • Updated on: Aug 06, 2014

    WPILib Sensor Overview

    The WPI Robotics Library supports the sensors that are supplied in the FRC kit of parts, as well as many commonly used sensors available to FIRST teams through industrial and hobby robotics suppliers.