BME680 Not working with ESP32

Hello, I am trying to connect a BME680 Sensor with an esp32 but it doesn't work. I have tried both the I2C configuration and the SPI config, neither of which worked. I have also tried scanning for I2C devices with this code

 #include <Wire.h>

void setup()
{
  Serial.begin (115200);  
  Wire.setPins (21, 22);   // sda= GPIO_21 /scl= GPIO_22
  Wire.begin ();   // 
}

void Scanner ()
{
  Serial.println ();
  Serial.println ("I2C scanner. Scanning ...");
  byte count = 0;

  Wire.begin();
  for (byte i = 8; i < 120; i++)
  {
    Wire.beginTransmission (i);          // Begin I2C transmission Address (i)
    if (Wire.endTransmission () == 0)  // Receive 0 = success (ACK response) 
    {
      Serial.print ("Found address: ");
      Serial.print (i, DEC);
      Serial.print (" (0x");
      Serial.print (i, HEX);     // PCF8574 7 bit address
      Serial.println (")");
      count++;
    }
  }
  Serial.print ("Found ");      
  Serial.print (count, DEC);        // numbers of devices
  Serial.println (" device(s).");
}

void loop()
{
  Scanner ();
  delay (100);
}

but it found zero devices. I used the example BME680 code but it didn't work, the serial output just says "Could not find a valid BME680 sensor, check wiring!". I also made sure that the wiring was correct but still no luck. Is my sensor just dead or am I doing something wrong?

which ESP32 module are you using?
which pins are you using for I2C? e.g. have a look at esp32-pinout-reference-gpios and esp32-pinout-esp-wroom-32-pinout
on the 38pin devkit I use SDA GPIO21 and SCL GPIO22

I used pins 22 and 21 with this board: ESP32 Development Board TYPE-C USB CH340C WiFi+Bluetooth Ultra-Low Power Dual Core ESP32-DevKitC-32 ESP-WROOM-32 Expansion Board. I left the BME680 plugged into the ESP32 and powered and all of a sudden it got really hot and started to smell so I think the sensor might be fried now. I have another but would sort of like to know why this happened and how to prevent it.

A. Power hooked up backwards (most likely, I think).
B. Connected to 5V (of more), if a 3.3V board.

1 Like


ESP32 Web Server with BME680 - Weather Station | Random Nerd Tutorials

Yea, likely fried... magic smoke released.

Mostly likely a wiring problem.

are you using a BME680 module such as the Adafruit BME680 or a basic BME680 on a breadboard which you have wired up yourself?
upload a schematic showing your wiring?
how do you power the device

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.