1

I am trying to read bme280 & tsl2561 on Pi Zero. I have connected bme280 to Pi Zero on Pin 3-I2C.1 SDA & Pin 5-I2C.1 SCL and was able to read the data over i2c following these instruction. Then connected tsl2561 to Pin 27-I2C.0 SDA & Pin 28-I2C.0 SCL.

When I list I2C connected devices with ls /dev/*i2c* it shows me just /dev/i2c-1. Why I am seeing just one device ?

Output of i2cdetect -y 1 was

0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 --

when I tried i2cdetect -y 0 got

Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory

Also tried to run TSL2561.py but got following error

$ python TSL2561.py
Traceback (most recent call last):
  File "TSL2561.py", line 16, in <module>
    bus.write_byte_data(0x39, 0x00 | 0x80, 0x03)
IOError: [Errno 121] Remote I/O error

Are Physical pin 27 & 28 are Pin 27-I2C.0 SDA & Pin 28-I2C.0 SCL respectively on Pi Zero W ? If yes what I need to do to activate them to read tsl2561 through them ?

Kernel Version : Linux pod01 4.14.79+ #1159 Sun Nov 4 17:28:08 GMT 2018 armv6l GNU/Linux

1 Answer 1

1

I²C.0 is reserved for system use.

It is only on the header for use by HATs.

2
  • How can I user other GPIO for I2C, since I2C.1 already consumed ?
    – rp346
    Commented Jan 18, 2019 at 3:25
  • 1
    @roy you can connect many I²C devices to the interface, provided they have unique addresses.
    – Milliways
    Commented Jan 18, 2019 at 3:27

Your Answer

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

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