Issue with NavX2 Replacement Returning 0 for getAngle()

Our team recently purchased a renewed NavX2 sensor from VEX to replace the old one we’ve been using for a while. According to the Kauai Labs documentation (link), the new version is supposed to function exactly the same in terms of robot code compatibility. However, when we run our code, the getAngle() method keeps returning 0.

Has anyone experienced a similar issue or have any suggestions for troubleshooting?

Thanks in advance!

Check the dip switches on the navx, we had one turned off by mistake and it was just staying at zero.

Not sure exactly which one it’s supposed to be though.

Hi,

Are the S1 and S2 LEDs green?
Is your vendordep up to date?
The latest should be 2024.1.0.

I would also check the dip switches, as CColeman suggested. It’s recommended for the SPI switch to be in the on position as the default method of communicating with the roboRIO.

also don’t forget to run a full calibration and fix/set your orientation properly to how you might be using it.

By default both of the dip switches were on, after turning one of them off, leaving the SPI switch on, it looks like the navx2 is working. Thank you for your help

1 Like

Perfect :+1: