Connecting I2c to ESp32 S3 supermini

I am attempting to use ESP32 S3 using the I2c to connect to a time of flight vl53lox. My test code works well using an ESP32 wrover setting SCL and SDA pins to non-standard (not 21 and 22). Moving the same code to the ESP32 S3 and changing the pins to 5, 6(bottom left pins) fails to boot the vL53lox. I have tried pins 7,8 also fails.

Any help much appreciated.
john wybrow

Code

#define SDA_1 5
#define SCL_1 6

TwoWire I2Cone = TwoWire(0);
//Adafruit_VL53L0X L1;

Adafruit_VL53L0X L1 = Adafruit_VL53L0X();

void setup() {
  Serial.begin(115200);
  Wire.begin(SDA_1, SCL_1, 100000);
  // wait until serial port opens for native USB devices
  while (! Serial) {
    delay(1);
  }

  Serial.println("Adafruit VL53L0X test.");
  if (!L1.begin()) {
    Serial.println(F("Failed to boot VL53L0X"));
    while(1);
  }
  // power
  Serial.println(F("VL53L0X API Continuous Ranging example\n\n"));

  // start continuous ranging
  L1.startRangeContinuous();
}

void loop() {
  if (L1.isRangeComplete()) {
    Serial.print("Distance in mm: ");
    Serial.println(L1.readRange());
  }
}```
1 Like

Iā€™m going to assume you updated the chip in the Arduino to the ESP32 S3.

1 Like

Hi all,
fixed my problem using the wrong pins for 3.3v works well.
thanks all.

2 Likes

Hey @John54020,

Good to hear you figured it out!

If you run into any issues in the future we are here to help. :slight_smile: