Enviro+ can't detect sensors w/ Raspberry Pi 4

Recently picked up a Pimoroni enviro+ sensor for some hydroponics monitoring. I’m having issues with the Pi 4 not being able to find any of the sensors. I parsed the forum for issues similar to mine and found this thread: Connecting Enviro to R Pi4
However, the solution to that problem was to replace the enviro+, which I would love to avoid if possible.

I ran all the same troubleshooting steps that were suggested in that thread. For example, when I run python3 weather.py I get a traceback that ends with:

    raise RuntimeError("Unable to find bme280 on 0x{:02x}, IOError".format(self._i2c_addr))
RuntimeError: Unable to find bme280 on 0x76, IOError

The part that is confusing me the most is that lcd.py script does work. When I run that script, I see the Hello, World print out on the LCD screen.

I’ve also run i2cdetect -y 1 and get:

00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --     

which tells me the sensors aren’t being detected.

Another example of an error I’m seeing python3 light.py:

Traceback (most recent call last):
  File "light.py", line 8, in <module>
    ltr559 = LTR559()
  File "/usr/local/lib/python3.7/dist-packages/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):
TimeoutError: [Errno 110] Connection timed out

I’ve also tried toggling the SPI while grasping at straws (suggested by this comment in the linked post: Connecting Enviro to R Pi4 - #7 by andywarburton) with no luck.

Looking for any help with troubleshooting to try to nail down what’s going on. Hoping it’s not the unit. Thanks in advance!

I have to ask the obvious, firmly and correctly attached to the GPIO header?

Yep, reseated and no change.

Something is for sure not working right on i2c. Did you have anything connected previously that used i2c?
Buster or Bullseye?
Do you have another Pi you can test the Enviro on?

If it was me, I think I’d start over with a fresh install of Buster on that Pi 4B. Just to make sure its not a software glitch.

1 Like

So I actually got my hands on another enviro, replaced the original with the new one, and ran one of the example scripts without changing anything on the software side of the Pi and it worked. There must be something wrong with the original enviro+.

Thanks for your help and the ideas!

My guess is one of the i2c sensors has failed and is taking the i2c bus down with it.

1 Like