Missing modules and I/O Error with Envirophat on Pi ZeroW

Hi

I just received my Envirophat (not the plus) and, keen to crack on and see what it can do, I’ve plugged it onto my Pi Zero W (using M/F headers) and installed the packages as detailed here: https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-enviro-plus and try and run some of the examples, e.g. all-in-one.py but I’m getting:
ImportError: No module named 'BME280'
and
ImportError: No module named 'ST7735'

So I thought I’d go back to basics and just check the board is attached properly and functioning OK, so I found https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-enviro-phat fired up python on the command line and…

    >>> print(weather.temperature())
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python3/dist-packages/envirophat/bmp280.py", line 134, in temperature
        self.update()
      File "/usr/lib/python3/dist-packages/envirophat/bmp280.py", line 169, in update
        if self._read_byte(REGISTER_CHIPID) == 0x58: # check sensor id 0x58=BMP280
      File "/usr/lib/python3/dist-packages/envirophat/bmp280.py", line 116, in _read_byte
        return self.i2c_bus.read_byte_data(self.addr, register)
    OSError: [Errno 121] Remote I/O error

I’m trying to work out where I’ve gone wrong with either issue…
Any help gratefully received.

Double check the i2c and SPI are enabled either in Raspberry Pi Configuration, or raspi-config if your running the lite version of Raspbian.

Yep - enabled them both

Ok, since its not the Plus, try the following
curl https://get.pimoroni.com/envirophat | bash
And then try one of these examples.

Tried running all.py and got

--- Enviro pHAT Monitoring ---Traceback (most recent call last):
  File "all.py", line 20, in <module>
    rgb = light.rgb()
  File "/usr/lib/python3/dist-packages/envirophat/tcs3472.py", line 76, in rgb
    return tuple([int(x * 255) for x in self.scaled()][:CH_CLEAR])
  File "/usr/lib/python3/dist-packages/envirophat/tcs3472.py", line 68, in scaled
    rgbc = self.raw()
  File "/usr/lib/python3/dist-packages/envirophat/tcs3472.py", line 88, in raw
    self.setup()
  File "/usr/lib/python3/dist-packages/envirophat/tcs3472.py", line 44, in setup
    self.i2c_bus.write_byte_data(ADDR, REG_ENABLE, REG_ENABLE_RGBC | REG_ENABLE_POWER)
OSError: [Errno 121] Remote I/O error

Ok try this, from a terminal Windows run
sudo i2cdetect -y 1
You should get the following
0x49 for the ADS1015
0x29 for the TCS3472
0x1d for the LSM303D
0x77 for the BMP280


Do you have the Enviro pHat (black no display) or the Enviro (white with the small display)?

The white one with the small display.
Output from i2cdetect:

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

Ok the Envirophat in the thread title threw me off a bit. My Enviro “phat” links above are not relevant.
23 and 76 look correct, 23 is the light sensor and 76 is the BME280. The only pinout I can find is for the plus.


and same deal for the github page

I’m not sure whats going on? If it was me, I think i would start over with a fresh Raspbian install. I’d go with the “with Desktop”. And do the github install thats linked from the product page python library link.