Selecting an Interface

navX2-Micro provides two methods for communicating with robotics control applications:

Streaming vs. Register-based Communication

The navX2-Micro interfaces fall into two types:  Streaming and Register-based.

Streaming:  data is sent at regular intervals by navX2-Micro, and the host is notified when new data arrives.  The streaming data is sent in two different formats:  Processed Data and Raw data.  Streaming is used over the USB interface.  More details on the communication detail are available in the Serial Protocol Definition.

Register-based: communication is initiated by the host whenever new data is desired, and the host can request any data required.  Register-based communication is used over the I2C interface.  More details on the communication detail are available in the Register Protocol Definition.

Comparing the navX2-Micro Communication Interfaces

Interface Type Speed Latency Type Cable distance Max Update Rate
USB 12 mbps <1ms Streaming 6  meters 200
I2C 400 kbps ~10ms Register-based 1 meter 200

Recommendations

The USB interface is the recommended method for interfacing to navX2-Micro, based on for the higher communications bandwidth, lower latency and longer maximum cable distance.

[Update:  1/12/2022.  For the 2022 FRC Season, the RoboRIO “onboard” I2C port has been reported to be unreliable.  Therefore if using a RoboRIO, connect to the MXP I2C port, not the “onboard” I2C port until this is reported to be resolved.]

There are however a few cases where using the I2C interface is a reasonable option:

  • When interfacing to a robot control systems which don’t support USB-connected sensors (e.g., the FTC Android-based REV Expansion or Control Hub).
  • When already using the USB interface connection to a secondary processor (e.g., a video processor)