Setup
- Requires enabled i2c as described here
- Download the
bme280.py
python script from https://www.raspberrypi-spy.co.uk/2016/07/using-bme280-i2c-temperature-pressure-sensor-in-python/ or https://bitbucket.org/MattHawkinsUK/rpispy-misc/raw/master/python/ - Install required libraries:
sudo apt-get install python-smbus
Make the script executable and run it. If the BME280 is wired up correctly, following output should appear:
Chip ID : 96 Version : 0 Temperature : 23.18 C Pressure : 994.415458604 hPa Humidity : 33.6359104061 %