From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-20-2021 06:43 AM - edited 12-20-2021 07:18 AM
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.
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).
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.
Solved! Go to Solution.
12-20-2021 09:14 AM
The I2C interface on Raspberry Pis is not enabled by default. Have you enabled it?
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
12-20-2021 10:25 AM
Hi Redhawk,
I have enabled it.
12-21-2021 06:23 AM - edited 12-21-2021 06:23 AM