LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

how to read a MPU 6050 through Labview.

Attached is a VI to read the 6050 MPU with MyRio. This is part of a project that is a work in progress, so let me know if it doesn't work for you for some reason.

Message 21 of 47
(8,399 Views)

Hi,

I've tested your sample code and it ran perfectly on my myrio board. The only problem remained unsolved was the erratic reading from the gyroscope, which constantly deviated from its datum point although it was not being moved. Is there a way to overcome this issue?

0 Kudos
Message 22 of 47
(8,399 Views)

I also noticed that my signal occasionally deviated from its setpoint and then drifted back quickly. I didn't explore the cause of this too heavily though.

Message 23 of 47
(8,399 Views)

Hey DocPhil,

I have been attempting to get the MPU6050 to work with LabVIEW and myRIO, but I keep getting errors.  I also found this thread and downloaded your .zip file for your code.  However, I get an error on the Write during the initialization of the device.

I have wired:

3.3V --> VCC

GND --> GND

VIO --> GND

SDA --> 34

SCL --> 32

I know that SDA and SCL go into 34 and 32, but we're still unable to read data.

Any ideas?

LabVIEW Screenshot.png

0 Kudos
Message 24 of 47
(8,399 Views)

Oh, is been a while. You may need to check that the registers are correctly referenced.

0 Kudos
Message 25 of 47
(8,399 Views)

So, it turns out that the SparkFun MPU-6050 requires that the VIO is also given a 3.3V connection along with the VCC.  Once I did this, data was streaming.  Hopefully this information can be of use someday for anyone struggling to get acceleration data on a SparkFun MPU-6050...

Message 26 of 47
(8,399 Views)

Heya

were you happen to be using the break out board:

MPU 6050 GY-521

from sparkfun? I'm trying to compile the same code but keep getting that -363011 error. And I dont see a pin 'VIO' to set to 3.3V like you have suggested?

0 Kudos
Message 27 of 47
(8,399 Views)

I can't find a GY-521 being sold by Sparkfun. Can you provide a link to the

sensor's page where you purchased it?

If I recall correctly, you only need to supply 5V to VCC (and ground of course) to power the device.

0 Kudos
Message 28 of 47
(8,399 Views)

Oops. My bad. I had forgotten to change the interrupt channel from "A/DIO1" to "B/DIO1" because I was using connector B on myRIO. Your code works like a charm

0 Kudos
Message 29 of 47
(8,399 Views)

Great, I am glad the code worked for you. For purchase, you can search "GY-521" on Amazon.

Best,

Phillip Daniel

Massachusetts Institute of Technology, S.B. '13

S.M. Candidate '15

Department of Mechanical Engineering

Website (www.thecomaps.com) | LinkedIn (www.linkedin.com/in/philliphdaniel)

0 Kudos
Message 30 of 47
(8,399 Views)