This guide is adapted from the Toronto Coding Collective
From the WPILib reference:
The WPI Robotics library (WPILib) is a set of software classes that interfaces with the hardware and software in your FRC robot’s control system. There are classes to handle sensors, motor speed controllers, the driver station, and a number of other utility functions such as timing and field management.
This is a list of the primary WPILib classes used in robot programming:
- Scheduler - scheduling a command
- Command - the basic framework for all commands
- Subsystem - a container for sensors, motors and pneumatics actuators.
- XboxController - An interface to the Xbox controllers we use to drive our bots
- SendableChooser - a way to select an auto pattern on the SmartDashboard
- SmartDashboard - put debug/status information on the SmartDashboard
- DifferentialDrive - calculator for left/right drive robots
- MecanumDrive - calculator for 4 wheel mecanum drive robots
- Jaguar, PWMSpeedController, SD540, Spark, Talon, TalonSRX, Victor, VictorSP - a motor connected to a PWM port
- TalonSRX - a TalonSRX connected to the CAN bus (requires the CTRE vendordep)
- AnalogInput - an analog input (ie. proximity sensor)
- DigitalInput - a limit switch or other digital input plugged into a DIO port
- Counter - a counter attached to a DIO channel used to count fast DIO pulses
- roboRIO USB: 172.22.11.2
- roboRIO mDNS: roboRIO-####-FRC.local (where #### is your team number with no leading zeroes) You should be able to use this address to communicate with the roboRIO over either interface through ping, browser, etc.
- Robot Radio: 10.TE.AM.1 (where TE.AM is your 4 digit team number with leading zeroes if required)
- DHCP range: 10.TE.AM.20 to 10.TE.AM.199