@rqz wrote:
Hi,
Last evening, I finally unpacked my enviro phat and plugged it on a brand new install (Rasbian) of my raspberry pi Zero W. While following your great tutorial page I encountered the following error:
Traceback (most recent call last): File "Pimoroni/envirophat/examples/all.py", line 6, in <module> from envirophat import light, weather, motion, analog File "/usr/lib/python2.7/dist-packages/envirophat/__init__.py", line 13, in <module> weather = bmp280(bus) File "/usr/lib/python2.7/dist-packages/envirophat/bmp280.py", line 104, in __init__ if self._read_byte(REGISTER_CHIPID) == 0x58: # check sensor id 0x58=BMP280 File "/usr/lib/python2.7/dist-packages/envirophat/bmp280.py", line 131, in _read_byte return self.i2c_bus.read_byte_data(self.addr, register) IOError: [Errno 121] Remote I/O error
Apparently, as soon as I try to import the envirophat library, the bmp280 part of the __init__.py create an error. I tried to comment out the line 13 of __init__.py to prevent it from loading the bmp280 and now this little example works perfectly:
#!usr/bin/python import time from envirophat import light, leds #test modules other than weather (bmp280) try: while True: lux=light.light() leds.on() rgb=str(light.rgb())[1:-1].replace(' ', '') leds.off() print('%f\t%s'%(lux,rgb)) time.sleep(1) except KeyboardInterrupt: leds.off()
I looked at my board and noticed that the bmp280 chip (baro/temp) doesn’t look like the one of the boards you can see online. Mine is missing a little metal box on top of it. I’ve found the metal box in the bottom of the ESD static shielding bag the board came in (cf. picture).
Might this be the reason why the bmp280 doesn’t work? Is there a way to fix this problem, fix the metal box back to the chip?
Best,
rqz
Posts: 2
Participants: 2