Connecting the BME280 Sensor

The BME280 Environmental Sensor connects to the Pi at 5 pins. Below is a list of the wires and the pin to which they connect

  • CS (Chip Select) - Green: Leave this wire disconnected
  • ADDR / MISO - Orange: Connect to Pin 19
  • SCL / SCK - Yellow: Connect to Pin 5
  • SDA / MOSI - Blue: Connect to Pin 3
  • GND (Ground) - Black: Connect to Pin 6
  • VCC - Red: Connect to Pin 1

Enabling the sensor and locating its address

After you've finished wiring everything up, we need to enable the sensor and locate its address. Open the terminal

  1. Enter sudo raspi-config
  2. Select "Interface"
  3. Select "I2c"
  4. Enable

Next, we will need the sensor's address on our Pi. Enter sudo i2cdetect -y 1, and make note of the number in the table. In our case, it's 77.