Problem using I2C with firebeetle 2 esp32 c6

userHead Leon.Leon 2025-05-03 20:27:30 1094 Views2 Replies

Hi there

 

I want to connect a VL53L0X via I2c to my new firebeetle 2 esp32 c6. However, I receive the following error: “E (250) i2c.master: I2C transaction unexpected nack detected”

The same code and sensor is working perfectly on a xiao esp32 c6.

 

I've measured the voltage directly on the firebeetle relativ to ground for sda and scl. All sda/scl pins on the board do not have a voltage.

They should be around 3.3V, right?

 

Is there something missing on the setup procedure?

 

```

SFEVL53L1X distanceSensor;

 

void setup(void) {

  Serial.begin(115200);

  Wire.begin(SDA, SCL); 

 

  if (distanceSensor.begin() != 0) {

    Serial.println("Sensor failed to begin. Please check wiring. Freezing...");

    while (1) delay(10);

  }

  Serial.println("Sensor online!");

  …

}

 

```

 

thank you in advance

Leon

2025-06-04 09:51:32

The I2C bus should always be high when idle.
You can upload a code that doesn't call I2C and then measure the voltage from SDA/SCL to GND, if it's still 0V, you have a faulty ESP32.
You can apply for after-sales service from the seller.

userHeadPic Yeez_B
2025-05-03 21:41:18

Run the I2C snanner code and see if the sensor is being detected. 

userHeadPic ahsrab.rifat