Using the Adafruit BME280 with the ESP32

Previously I had been successfully using the BMP180 Pressure-Temperature sensor with an ESP32 Microprocessor. The four pin outs for the BMP180 are Vin, GND, SCL & SDA.

Recently purchased an Adafruit BME280 Pressure-Temperature-Humidity sensor from Core Electronics that I also planned to use with an ESP32 microprocessor however I’ve not had much success in getting it to work. My problem is that the pinout pin naming nomenclature of this device is different to that of the BMP180 and other BME280’s that Core Electronics sell.

Basically there are more pins on this device, these being Vin, 3V3, GND, SCK, SD0, SD1 and CS.

After extensive search on the WWW I have not been able to obtain any information on how to connect the BME280 that I have along with supporting Arduino IDE code for an ESP32.

What pins on the BME280 other than power and earth are compatible with the BMP180?
Are you able to provide any help please?

John Bennett

Have you followed the Adafruit Tutorial. I assume you have.
Note: the BMP180 you describe is a i2C device, the Adafruit BME280 can be i2C or SPI.
Have you tried both, it would mean changing the pin connections on the ESP32.
The Adafruit libraries may not work with the ESP32.
If you are using i2C, the address default set by Adafruit is 0x77, other manufacturers have used 0x76.

I experienced this with a Pimoroni BMP280 when using the Adafruit library. It was easily changeable in the software.

The following wiring shown on the Adafruit tutorial should work with the BMP180 wiring you have. It implements a i2C interface. The Adafruit library for the Arduino should use these pins.

  • Board 3V to sensor VIN
  • Board 3V to sensor CS
  • Board GND to sensor GND
  • Board SCL to sensor SCK
  • Board SDA to sensor SDI

(Core Electronics Customer)