Wrong I2C bus

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

Wrong I2C bus

Postby JoJoModding » Sat Dec 09, 2017 5:07 pm

Hello,
I'm trying to access a sensor via I2C on my Raspberry PI 2 B. However I'm not sure that I have enabled I2C correctly. Every tutorial online says that I should see the device when I run "i2cdetect -y 0", however that just gives:
$this->bbcode_second_pass_code('', 'Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory')

So apparently the i2c-0 bus isn't there. What is there however is i2c-2 and i2c-3. Running "i2cdetect -l" gives me this:
$this->bbcode_second_pass_code('', '
i2c-3 i2c soc:i2cdsi I2C adapter
i2c-2 i2c bcm2835 I2C adapter I2C adapter
')

Running i2cdetect on bus 2 or 3 does not show the sensor (or any device at all), although it must be there somewhere. I have triple-checked my wiring.
Thanks for your help.
JoJoModding
 
Posts: 2
Joined: Sat Dec 09, 2017 4:57 pm

Re: Wrong I2C bus

Postby andre » Sun Dec 10, 2017 5:15 pm

Have you configured the correct device tree overlay in config.txt?
https://elinux.org/RPiconfig#Device_Tree
https://github.com/raspberrypi/firmware ... ays/README

Have you placed pull up (4K7) resistors to 3V3 on both SDA and SCL lines?
Is the speed you are using supported by the I2C sensor?
andre
 
Posts: 68
Joined: Wed Jan 25, 2012 1:39 pm
Location: Eindhoven


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 16 guests

cron