Quote:
Originally Posted by rich2202
We are going to try and incorporate the navX this weekend onto our practice bot. We are going to start with the sample code.
In order to avoid the I2C problem, how do we set it up for UART communications?
Thanks.
|
The navX MXP can communicate via TTL UART, SPI and I2C; selecting the communication path is a software setting. No hardware changes are necessary as long as the
"plug-n-play" installation method is used.
For
C++ /
Java, currently only the TTL UART is supported in software; simply review the respective page on the navX MXP wiki for pointers on getting started.
For
LabView, in addition to I2C, both SPi and TTL UART are supported. We have done pretty extensive testing as have others on SPI, and it is the fastest way to communicate with the navX MXP. Our testing on SPI recently has focused on verifying brownout recovery, and for SPI that it is very robust, too. Our current understanding: if you have connected the navX MXP USB to the VRM, the SPI bus is reliable even if there is a RoboRio Stage 2 (or even Stage 3) brownout - and other teams are using this interface w/out problem. If the USB/VRM backup power source is not present, the navX MXP will get reset when a Roborio Stage 2 brownout occurs, but our testing has verified that the RoboRio/navX MXP SPI interface recovers in this case, too.
However, for those that experience trouble w/SPI, the Labview library also has a Serial Example, as well.