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?