Historical lesson
This material predates the 2026 course and may use older WPILib, vendor APIs, team wrappers, and game rules. Its original version is not verified here. Do not copy its robot code into a 2026 project without migration and mentor review. Start with the 2026 subsystem lesson.
Vendor Dependencies
When we use hardware from a third-party source, we need to place what are called "vendor dependency" files into our robot program.
A prime example of such hardware would be a motor controller (see Motors for more detail). Say we are using a SPARK MAX controller from REV Robotics--in order for the controller to actually function, we need to get the vendor dependency (a .json file) from REV Robotics' website.
Installing
The following steps for managing vendor dependencies online can be found on that site:
- Open your robot project in VSCode.
- Click on the WPI icon in the corner to open the WPI Command Pallet.
- Select Manage Vendor Libraries.
- Select Install new library (online).
- Enter the following installation URL and press ENTER:
http://www.revrobotics.com/content/sw/max/sdk/REVRobotics.json
If you are managing vendor dependencies offline, you must:
- Download and unzip the latest SPARK MAX Java API into the C:\Users\Public\wpilib\2020 directory on windows and ~/wpilib/2020 directory on Unix systems.
- Follow the Adding an offline-installed Library instructions from WPI.
Similar steps can be followed with other devices, such as the Talon SRX motor controller (or other motor controllers from CTRE) and navX-MXP gyroscope.
Updating
Over time, those third-party vendors will most likely release new updates, and will do so through a new vendor dependency file. Therefore, it's our job to check for updates regularly.
To update the vendor dependencies, the steps are similar to those above:
- Open your robot project in VSCode.
- Click on the WPI icon in the corner to open the WPI Command Pallet.
- Select Manage Vendor Libraries.
- Select Check for updates (online). (Can also be (offline)).
- If an update appears, click on it. Otherwise, you're all set.