We are new to using the navx-mxp (mounted on RoboRio and connected via USB) and are trying to get the gyro readings working. We got the DataMonitor example working in Java - https://pdocs.kauailabs.com/navx-mxp/examples/data-monitor/ (our code is exactly the same just copied and pasted Java example). All the readings are showing up fine except for the raw values - RawAccel_X, RawAccel_Y, RawAccel_Z, RawGyro_X, RawGyro_Y, RawGyro_Z, RawMag_X, RawMag_Y, RawMag_Z. All these values just show up as 0 and never change; we cannot figure out why this is happening.
We updated our RoboRio firmware today, but the problem persists.
Let’s narrow things down a bit. The following indicators are helpful to help diagnose problems:
What value is being displayed on the dashboard for IMU_Connected?
Are there any error messages being logged to the Driver Station Console?
Can you confirm that you are using SPI to communicate with the board? This would mean your AHRS class constructor looks like this:
ahrs = new AHRS(SPI::Port::kMXP);
Are the two green LEDs on the board (S1 and S2) solid on during your testing?