LabVIEW_IconA LabVIEW software library and example code for integrating navX-MXP into a RoboRIO Robot is available. This library supports navX-MXP access via Serial Port, I2C or SPI interface, as well as via navX-MXP’s USB port.

Update [1/9/2016]:  The navX-MXP LabVIEW library for FRC has been updated to support the 2016 WPI Library.

To use the library, you can download the latest build of the libraries, or you can checkout the source code with Git.  To learn more about the library, online help is available.    If developing in a Linux or MacOS platform, you can download the cross-platform library package.

 Getting Started

After running the setup program included in the latest build, the libraries and samples will be installed to the following location:

<HomeDirectory>\navx-mxp\

For example, if your user name is Robot, the directory name will be C:\Users\Robot\navx-mxp.

Within this directory, the “labview” sub-directory contains the library and several example programs.

Two sample LabVIEW robot applications are provided for interfacing via a Serial interface and via SPI/I2C interface.

First, open the navX-MXP.lvproj LabVIEW project, then based upon the selected interface, open either the Serial or SPI/I2C  LabVIEW project, which are listed under the “RT roboRIO Target” section.

Serial

Open the “navX Example (SERIAL).vi”, then select the appropriate “Update Rate”, and begin running the sample application, which will connect and then begin displaying navX-MXP sensor readings.

SPI/I2C

Open the “navX Example (SPI-I2C).vi”, then select the appropriate “navX Interface Protocol”, and “Update Rate”, and begin running the sample application, which will connect and then begin displaying navX-MXP sensor readings.

Next Steps

After getting the sample navX-MXP application running, please see the Examples section for a description and sample code which implements some key capabilities enabled by navX-MXP.