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());
}
}```