0

I am following this tutorial

It did not work and I looked for help online but still I cannot make the i2c works.

This is my current condition. If you need more data, please let me know.

Could anybody help me?

sudo nano /etc/modules

i2c-bcm2708
#i2c-bcm2835
i2c-dev

and

sudo nano /etc/modprobe.d/raspi-blacklist.conf

#blacklist spi-bcm2708
#blacklist i2c-bcm2708

also config

#dtparam=i2c=on1=on
#dtparam=spi=on
dtparam=i2c_arm=on
dtparam=i2c_vc=on
device_tree=on
dtparam=spi=on

enter image description here

8
  • It's unclear what your asking, what exactly is not working?
    – sir_ian
    Apr 2, 2016 at 20:16
  • According to some tutorial, I should get 1b instead of uu. Running sudo i2cget -y 1 0x1b 0x75 also results error: device or resource busy. Apr 2, 2016 at 20:33
  • If i2cdetect -y 1 shows that output it is working -- or at least there is not much reason to believe it isn't. Do you mean there's a device attached that's not working?
    – goldilocks
    Apr 2, 2016 at 20:33
  • UU I think could mean a kernel module is using a device at that address. Judging by the lsmod output, this could be the case. If you have a device attached, what it is it?
    – goldilocks
    Apr 2, 2016 at 20:37
  • I am writting via cellphone now so cannot paste the link. In the next page of the tutorial I mentioned above, there is the sourcecode to retrieve data from mpu6050. Running that python code will give me error: device or resource busy. From here, I assume that the address uu is related to this problem. This is my first time playing with i2c. Apr 2, 2016 at 20:39

1 Answer 1

1

if you can see o/p at terminal using sudo i2cdetect -y 1 it means you have installed correct driver. few things you can check.

  1. did you enable I2C in boot config. if yes then i believe your master I2C is working fine( raspberry pi I2C).

  2. now move to your slave, did you check few things

    a. what is your slave device voltage level. is it 3.3v or 5V. pi i2c is 3.3v.

    b. are you using the pull up. i2c wont work if you are not using pull up.

I use this raspberry Pi I2C adapter, it has on board pull up, level sifter. it makes real easy to use I2C.

if you are having problems with i2c code you can find some help over here. Java,python I2C code for Pi

2
  • answer #1, yes. answer #2a, it uses 3.3V, MPU6050 board. #2b it uses 3.3V so I do not need to worry about the pull up resistor, do I? I solder the header for the MPU6050 board now, and it works. I was not soldered last night when I start this post. I thought it would be just fine without soldering it because the led in the board was turned on. Thanks anyway for everybody here who gave me suggestion. I appreciate it. Apr 3, 2016 at 10:53
  • answer #1, yes. answer #2a, it uses 3.3V, MPU6050 board. #2b it uses 3.3V so I do not need to worry about the pull up resistor, do I? I solder the header for the MPU6050 board now, and it works. I was not soldered last night when I start this post. I thought it would be just fine without soldering it because the led in the board was turned on. Thanks anyway for everybody here who gave me suggestion. I appreciate it. The address should be 0x68. it shows this value now. But the register 0x1b still shows UU. I do not know why. I only connect 1 i2c device. Thanks again. Apr 3, 2016 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.