View Single Post
  #3   Spotlight this post!  
Unread 05-02-2016, 10:43
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 343
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: Need help using NavX Micro with Linux on Jetson TK1

Quote:
Originally Posted by ForeverAlon View Post
Hi Everyone,

Our team is looking to mount the NavX Micro to our onboard vision processor (the Jetson TK1) which is a Linux ARM based machine. Currently the only drivers I have found for the NavX are for Windows. Does anyone have any experience using this device with Linux or any idea how to go about implementing this. Thanks in advance.
The navX-Micro has I2C and USB interfaces; not sure which interface you'd select. USB is faster, and according to this article on the web, Linux has a built-in device driver that'd work with it:

"This sample code creates a USB connected virtual COM port, using the USB CDC class (Communications Device Class.) On Linux, this class does not require a driver: it is supported directly by the kernel. Simply put, it makes the STM32F4 function similar to a USB-serial adapter."

Next, are you wanting to interface to this from C++ or Java on the TK1?

I believe your vision code is all C++.

Based upon that, my thinking is you'd USB and C++.

A place to start would be the RoboRIO C++ class sources that work w/the WPI Library. [There are Java sources that are very similar, if you choose that language instead.]

You will need to modify the "IO" module (SerialIO.cpp or RegisterIOI2C.cpp) that corresponds to either I2C or the Serial Port. And you'll need to modify the AHRS class to remove the WPI Library code that inherits from PIDSource and LiveWindowSendable.

It'll be a bit of work, but I think it's doable. James Parks on your team is familiar w/the serial protocol. And you can contact me at scott@kauailabs.com if you have any questions.