Hey there,
I have a Raspberry Pi 4, connected to a Breakout Garden (4 I2C and 2 SPI) via a IDE cable.
On the Breakout Garden, I have a MICS6814 sensor in one of the I2C slots, and a BME280 sensor in another slot.
The MICS6814 sensor works fine, no issues.
Initially, the BME280 sensor worked fine too and I got reasonable readings from the sensor. Post-reboot of the Pi, I now get consistently “stuck” readings from the BME280 using the demo Python script from the Pimoroni Github repo. (bme280-python/examples/all-values.py at main · pimoroni/bme280-python · GitHub)
22.17°C 678.38hPa 65.92%
I’ve tried:
- Removing all components and using the BME280 alone; no success
- Plugging the Breakout Garden into the Pi with no IDE cable; no success
- Trying all four I2C slots moving the BME280 sensor around, alone; no success
- Reinstalling the Python package for the BME280 (pip … pimoroni-bme280)
- Trying all of the above with the MICS6814 sensor also in place to confirm the Breakout Garden works; BME280 doesn’t work but MICS6814 does work.
I cannot get the sensor to give me an updated/accurate reading.
Is the sensor borked, or am I losing myself to something silly?
Edit 1: Both the MICS and BME sensors “work” as in, there are no IO problems, but for the benefit of
the doubt, here is the output of i2cdetect -y 1
with both sensors plugged in.
pi@raspberrypi:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- 19 -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 --
To the best of my knowledge the 76 address is correct for the BME280, and will disappear if not plugged into the Breakout Garden. So at this point: I have no idea why the sensor gives back this static/constant reading.
Edit 2: I’ve tweaked /boot/config.txt adding dtoverlay=i2c-sensor,bme280
. After a reboot, reading the BME280 sensor results gives output like the following. Each of the three files can intermittantly give errors, like as seen in the humidity results.
pi@raspberrypi:/sys/bus/iio/devices/iio:device0 $ cat name
bme280
pi@raspberrypi:/sys/bus/iio/devices/iio:device0 $ cat in_temp_input
21750
pi@raspberrypi:/sys/bus/iio/devices/iio:device0 $ cat in_pressure_input
99.457207031
pi@raspberrypi:/sys/bus/iio/devices/iio:device0 $ cat in_humidityrelative_input
cat: in_humidityrelative_input: Input/output error
Edit 3: After resetting the config in /boot/config.txt
the output from the sensor has defaulted back to the original “stuck” output - 22.17°C 678.38hPa 65.92%
.
Is my sensor faulty?