Connecting old navX to arduino

I have an old navX micro, the back says “9/26/2015 - v4.1”, I have it connected right now to an arduino through the 5v, ground, scl and sda ports, but have no idea how to read its values. Does anybody have the wpilib code for it, or something that I can start from?

Thank you! I copied over the code but when it runs it prints a bunch of random characters, like boxes and backwards question marks. Do you have any idea why that’s happening?

I’m assuming you’re using the Arduino IDE’s serial console to view the data. If you’re seeing unexpected characters, that’s typically an indication that the serial baud rate set in the serial console is not matching the Arduino code.

If you look at the source code in the navX_I2C.ino file, you’ll see the baud rate is set on line 12 - your Arduino serial console serial rate should match this.

  • scott

P.S. I think it’s cool that you’re delving into using the Arduino this way, it’s a great way to learn at a deeper level about digital communications and electronics.