Issues on NAVX

We have been working on implementing the NAVX. However, the connection doesn’t work for the SPI connection or I2C connection, and with the USB, it only shows as connected in intermittent spurts (about half the time). When attempting to read the X,Y, and Z raw values, they are 0. Any ideas?

Hi Charlie,

I think it’d be best to focus on why the SPI and/or I2C connections are not working. I’m assuming you have a navX-MXP that is seated in the RoboRIO MXP slot, and that you have inserted the two screws so that the board is securely mounted to the RoboRIO.

Given that configuration, there are a few key things to check:

  1. After the navX-MXP has completed the power-on sequence (which takes about 2 seconds), are the Green S1 and S2 LEDs on the sensor fully lit? If they are, then this indicates that the sensor and firmware are executing correctly.

  2. Next, in your code I’d recommend outputting the value returned from the “isConnected()” method of the java AHRS class to the dashboard, and updating the dashboard regularly in your software. When you are having troubles, is this returning true?

If the result of test 1) is postive, but the isConnected() method is returning false, it’s possible that there is a thread running in the robot application that is not yielding the processor so that the “IO Thread” in the navX-sensor library is not getting a chance to run. This thread has to run regularly, or else the library will detect a timeout condition because new data has not been recently retrieved from the sensor, and thus the software determines it is no longer connected.

Please let us know the results of your investigation to the above.


  • scott

We had to declare a device id# in our code. After that, it started working without the direct is and sample.

Hi Charlie, just wanted to check in - were you able to resolve this issue?