Qwiic Atmospheric Sensor (BME280) Hookup Guide
Here are a few tips for troubleshooting this device.
If you are not using the Qwiic system, make sure your supply voltage is within the electrical specifications of the BME280.
No Available Devices
Double check your connections. On a Raspberry Pi, you may get this is indicated with an
OSError: [Errno 121] Remote I/O error readout.
On a Raspberry Pi, also make sure that the I2C hardware is enabled. This is usually indicated with an
Error: Failed to connect to I2C bus 1. readout.
Checking Your I2C Connection
A simple method to check if your Raspberry Pi can communicate over I2C with the BME280 sensor, is to ping the I2C bus. On the latest releases of Raspbian Stretch, the
i2ctools package should come pre-installed. If it isn't run the following command in the terminal:
sudo apt-get install i2ctools
i2ctools package is installed, you can ping the I2C bus with the following command in the terminal:
i2cdetect -y 1
You should see a table printed out in the terminal. If the BME280 is connected/working properly you should see the address space for 0x77 marked with 77.
As mentioned earlier, this tutorial does not go into detail about using an SPI connection as the Python library can only be used with an I2C connection. However, for users seeking an SPI setup, they can refer to the hookup guide for the original BME280 Sensor Breakout board.