Saturday, 20 May 2017

BM280, Raspberry PI, I2C, "i2cdetect -y 1": No such file or directory

When following this article to set up a temperature sensor on my Raspbery Pi, I had to do a couple of additional steps:

1. Configure I2C on the Pi. I did this by following this article and using raspbi-config and the advanced settings to enable I2C.

2. When running the command to check the I2C interface, I executed
i2cdetect -y 1

This returned "No such file or directory".

This required the following to be added to /etc/modules and reboot


3. After this "i2cdetect -y 1" was working, but not detecting any hardware. (It show 77 in the list somewhere).

The next step was because the boot needed to configure some hardware pins.

If you are running a recent Raspberry Pi (3.18 kernel or higher) you will also need to update the /boot/config.txt file. Edit it with sudo nano /boot/config.txt and add the text
at the bottom. note that the "1" in "i2c1" is a one not an L!

4. This still didn't fix it.

I was running on kernel 3.18.

I did a
apt-get dist-upgrade

and then went back into raspi-config and disabled "Device Tree".

This time I got UU when running i2cdetect.

No comments:

Post a Comment