Hello,
I’ve been scratching my head on an issue for a couple of days now. I’m getting I2C errors while trying the example script for the LTR559 sensor.
I’m running a Raspberry Pi 3B+ with the Enviro+ module directly attached to the GPIO pins using the recommended Raspbian OS from the Raspberry Pi Imager utility.
When attempting to run the light.py example script from the Enviro+ GitHub page I get:
Traceback (most recent call last):
File "Pimoroni/enviroplus/examples/light.py", line 8, in <module>
ltr559 = LTR559()
File "/usr/local/lib/python3.7/dist-packages/ltr559-0.1.1-py3.7.egg/ltr559/__init__.py", line 218, in __init__
self.part_id = self._ltr559.get('PART_ID')
File "/usr/local/lib/python3.7/dist-packages/i2cdevice/__init__.py", line 230, in get
self.read_register(register)
File "/usr/local/lib/python3.7/dist-packages/i2cdevice/__init__.py", line 183, in read_register
self.values[register.name] = self._i2c_read(register.address, register.bit_width)
File "/usr/local/lib/python3.7/dist-packages/i2cdevice/__init__.py", line 288, in _i2c_read
for x in self._i2c.read_i2c_block_data(self._i2c_address, register, bit_width // self._bit_width):
OSError: [Errno 121] Remote I/O error
I’m not entirely certain what is actually going wrong as using the “i2cdetect -y 1” command yields:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- 23 -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- 49 -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 --