Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading IMU data with python

I haven't been able to track this down, but is it possible to pull i2c data from an IMU with python?  

 

I am not particularly concerned with high performance -- getting the data a few times per second is fine.   Actually, it doesn't really need to be i2c -- i just want to read roll and pitch data a few times a second, so if there is a way to go about this, I would certainly appreciate knowing about it.

 

CRIO 9053 

9403 module

0 Kudos
Message 1 of 9
(2,493 Views)

You've not said what the model of your IMU is.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 9
(2,488 Views)

I have not purchased an IMU yet -- hoping I could get an indication of some possibilities before doing so. Recommendations are always welcome.

 

-Evan-

0 Kudos
Message 3 of 9
(2,484 Views)

Whatever the choice of IMU (unless it has analog outputs and you've matching analog input c-series modules), you've to develop some code on cRIO (FPGA) to do the digital communication to get packets of IMU data. In this case, the cRIO can be programmed only using LabVIEW.

 

IMO, If you want it to be simple, you can purchase an IMU that has analog output, buy matching sound and vibration input C-series modules, use the cRIO in DAQmx scan mode, this way you can directly code in DAQmx libraries in Python.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 9
(2,468 Views)

Simple sounds good.   So I can use something like an Analog Devices IMU with a NI-9218 card for this?

 

Thanks for pointing me in the right direction - I would rather not go down the digital route, then.

 

-Evan-

0 Kudos
Message 5 of 9
(2,435 Views)

Unless you have got the hardware you mention and are limited to using them, I would recommend purchasing one of the combo products from https://www.ni.com/en-us/shop/hardware/products/usb-sound-and-vibration-measurement-bundle.html

 

9218 is a good choice, but compatibility with Analog Devices IMU cannot be generalized, the compatibility has to be evaluated on a case by case basis.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 6 of 9
(2,431 Views)

I have the CRIO chassis now -- that's the only bit that is set.  I already use the 9411 and 9403 modules to read a rotary encoder and control a sprayer, so I'm pretty far down that path.

0 Kudos
Message 7 of 9
(2,427 Views)

Since you already have a DIO module, and anyway you're going to program the cRIO, it is best to go with an IMU with a digital interface and implement the digital communication protocol using the 9411 module.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 8 of 9
(2,420 Views)

If using an analog output IMU is more simple, I'll just go that direction.

 

Thanks so much for your help on this.

 

-Evan-

0 Kudos
Message 9 of 9
(2,405 Views)