Recent Updates
-
Updated on: Jan 20, 2023
Displaying Data on the DS - Dashboard Overview
Often it is desirable to get feedback from the robot back to the drivers. The communications protocol between the robot and the driver station includes provisions for sending program specific data. The program at the driver station that receives the data is called the dashboard.
Manual WPILib programming -
Updated on: Jan 20, 2023
Custom IO - Cypress FirstTouch Module
The Cypress FirstTouch IO module is a board that allows teams to interface to custom IO solutions such as potentiometers, buttons, switches, encoders, and much more. The methods used with the Cypress board in standard (compatible) mode may also be used to interface with virtual IO provided by the DS software if the Cypress board is not attached.
Manual WPILib programming -
Updated on: Jan 20, 2023
Joysticks
The standard input device supported by the WPI Robotics Library is a USB joystick or gamepad. The Logitech Attack 3 joystick provided in the KOP from 2009-2012 comes equipped with eleven digital input buttons and three analog axes, and interfaces with the robot through the Joystick class. The Joystick class itself supports five analog and twelve digital inputs which allows for joysticks with more capabilities such as the Logitech Extreme 3D Pro included in the 2013 KOP which has 4 analog axes and 12 buttons. Note that the rest of this article exclusively uses the term joystick but can also be referring to a HID compliant USB gamepad.
Manual WPILib programming -
Updated on: Jan 20, 2023
Driver Station Input Overview
The FRC Driver Station software serves as the interface between the human operators and the robot. The software takes input from a number of sources and forwards it to the robot where the robot code can act on it to control mechanisms.
Manual WPILib programming -
Updated on: Jan 20, 2023
Operating pneumatic cylinders - Solenoids
There are two ways to connect and operate pneumatic solenoid valves to trigger pneumatic cylinder movement using the current control system. One option is to hook the solenoids up to a Spike relay; to learn how to utilize solenoids connected in this manner in code see the article on Relays. The second option is to connect the solenoids to a solenoid breakout board on top of a NI 9472 Digital Sourcing module in the cRIO (slot 3). To use these solenoids in code, use the WPILib "Solenoid" and/or "Double Solenoid" classes, detailed below.
Manual WPILib programming -
Updated on: Jan 20, 2023
On/Off control of motors and other mechanisms - Relays
For On/Off control of motors or other mechanisms such as solenoids, lights or other custom circuits, WPILib has built in support for relay outputs designed to interface to the Spike H-Bridge Relay from VEX Robotics. These devices utilize a 3-pin output (GND, forward, reverse) to independently control the state of two relays connected in an H-Bridge configuration. This allows the relay to provide power to the outputs in either polarity or turn both outputs on at the same time.
Manual WPILib programming -
Updated on: Jan 20, 2023
Repeatable Low Power Movement - Controlling Servos with WPILib
Servo motors are a type of motor which integrates positional feedback into the motor in order to allow a single motor to perform repeatable, controllable movement, taking position as the input signal. WPILib provides the capability to control servos which match the common hobby input specification (PWM signal, 1.0ms-2.0ms pulse width)
Manual WPILib programming -
Updated on: Jan 20, 2023
Actuator Overview
This section discusses the control of motors and pneumatics through speed controllers, relays, and WPILib methods.
Manual WPILib programming -
Updated on: Jan 20, 2023
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.
Manual WPILib programming -
Updated on: Jan 20, 2023
Choosing a Base Class
The base class is the framework that the robot code is constructed on top of. WPILib offers two different base classes, as well as a third option which is not technically a separate base class.
Manual WPILib programming