Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Gyro and Compass

Hi


I try to connect two different sensor to myrio :gyro and compass. I am using the sensors from the Myrio kit and each sensor is working perfectly using the attached VI.

 

when I try to combine this VI and read both of them together get measurement from the gyro but not from the compass.


Does anyone have experience with reading several different sensors from the same I2C?

 

 

Thanks

 

Eviatar

Download All
0 Kudos
Message 1 of 6
(6,329 Views)

Eviatar,

 

Can you post the VI you are having issues with and explain what you mean by not reading them together?  Is it throwing an error at any point or simply returning 0?


Best,

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 6
(6,297 Views)

Hi

 

You can try to take the two attached VI and combine them together and you will immediately see what I am talking about. I am not getting any error but the value coming out of the magnetometer remain fix at all time. Is generally there is a limit on the number of components connected to the I2C?

 

Thanks

 

Eviatar

0 Kudos
Message 3 of 6
(6,288 Views)

There's more than one way to put the two VIs together.  Unless they do it the same way you did, they are unlikely to see what you're seeing.

 

Are both devices listening for the same master or are you working with a diferent master?  Are you using the same mode for both VIs?  Did you send a stop command when talking to the compass befor sending a start command to the gyro?

0 Kudos
Message 4 of 6
(6,253 Views)

Hi

 

I try to use this VI and still I got only the Gyro measurement.
I am willing to try every other solution as long as I can get both of the sensors measurements.


Thank you
Eviatar

0 Kudos
Message 5 of 6
(6,242 Views)

Eviatar,

 

It looks like in your combined VI you configure your Gyroscope but not your Compass.  I would suggest trying to insert your Compass configuration right after you configure your Gyroscope. The attached image is what you should insert into your combain.vi before you attempt to Write/Read to your compass.

Matt J | National Instruments | CLA
0 Kudos
Message 6 of 6
(6,231 Views)