Paul's Tutorials - logoWPILib Tutorial



This is an in-depth tutorial of WPILib. It is designed to be easy for programmers new to robot programming to understand.

Downloads and setup

This process is compiled from the WPI Screensteps page.

Toolchain

In order to start using C++ on the robot, you need the robot's toolchain to build programs for it.

Download and install the appropriate file for your computer.

Mac users: Unzip the file, right click on "FRC ARM Toolchain.pkg" and select "Open" while holding down the Option key.

Eclipse

If you do not already have Java installed on your computer, make sure that you install it. Ensure that the Java version you get corresponds to your Eclipse version (32/64 bit).

FRC uses Eclipse to write and deploy robot code. Get the correct version for your computer:

Windows

32-bit  ⚫  64-bit

Mac OS X

64-bit

Linux

Most distros should have Linux in their repostories. Use your package manager to search for Eclipse.

Note: Eclipse from Ubuntu 14.04's repositories is extremely buggy.
If you cannot find an Eclipse package or are having trouble with a packaged install, try these links:

32-bit  ⚫  64-bit

Windows users: Unzip the folder into C:\Program Files\eclipse (This should be a new folder. Do NOT extract into "Program Files (x86)").

Linux users: Unzip the folder into /usr/share/eclipse (this should be a new folder). You may want to create a symbolic link in /usr/bin named "eclipse" to /usr/share/eclipse/eclipse.

Once you have Eclipse set up, open it. It should ask you where you want to create your workspace. The default is fine. Make sure that you select "Use this as the default and do not ask again."

Once in Eclipse, go to Window > Preferences > General > Workspace, and make sure that "Save automatically before build" is checked. Also, in Preferences, go to Install/Update > Automatic Updates and check "Automatically find new updates and notify me."

WPI Plugin

If this procedure does not work for you, try the offline procedure outlined on the Screensteps page.

In Eclipse, go to Help > Install New Software... . Click on the "Add..." button on the "Work with:" line. In the window that pops up, type in the following information:

Then click "OK". In the previous window, expand "WPILib Robot Development" and select "Robot C++ Development." Once you have done that, click "Next >" and then "Finish." OK any security warnings, and restart Eclipse when it finishes.

Driver Station

In order to interact with the robot from a computer, you need the FRC driver station. You can download this from the National Instruments website. This program is only available for Windows.

Run the installer. When prompted to enter a serial number, use the number that came with your team's LabView CD.

Congratulations! You're ready to go!

WARNING: If you are not comfortable with classes and pointers, STOP. Go back to C++ tutorial and reread those sections and/or practice writing programs with classes and pointers.

Chapter Index


Introduction Chapter 1: Basics →