Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C channel error during communication between LabVIEW and raspberry pi

I am trying to read acceleration values from MPU 6050 but I am getting this error code in LabVIEW:

 

Error 5005 occurred at :

Open.vi >>
I2C Open.vi

Possible reason(s):

The specified I2C channel (0) is not available on the Raspberry Pi 2 Model B.

 

I ran i2cdetect command to see connected devices and this is what I see:

 

 

pi@raspberrypi:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

 

I am not sure what to make of it!

 

I also want to mention that I want to read data from address 59 to 64 and I have entered the same in my VI but when I run the VI, this address is changed to 69 at the MPU60X0 read.vi. I don't understand why this is happening.

 

Edit: Changing the I2C channel to 1 removed this error but I got a new error now.

girish_jadhav_0-1640005113320.png

 


I ran example VI (Linx - Blink (Simple)) and it works so I don't think it is a communication problem. But a funny thing I noticed was I have raspberry pi 3 model b vi 2 but in LabVIEW it shown as raspberry pi 2 b (pinout is different).

 

girish_jadhav_0-1640003326493.png

In the example vi digital output pin was set to 23 but in case of raspberry pi 3 the same pin is numbered as 16 so I had to change that. But this shouldn't matter as SDA and SCL pins are located at same position in both versions of raspberry pi. 


I would really appreciate your inputs/help in solving this issue.

0 Kudos
Message 1 of 1
(1,224 Views)