2025-04-02 12:36 AM
Hi, I have X_NUCLEO-53L5A1 expansion board. I connected this board to ESP8266 inorder to use the VL53L5CX sensor. But the sensor is not being detected.
#include <Wire.h>
void setup() {
Serial.begin(115200);
Wire.begin(4, 5); // GPIO4 (SDA), GPIO5 (SCL)
Serial.println("\nI2C Scanner - Searching for devices...");
}
void loop() {
byte error, address;
int nDevices = 0;
Serial.println("Scanning...");
for (address = 1; address < 127; address++) {
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0) {
Serial.print("I2C device found at address 0x");
Serial.println(address, HEX);
nDevices++;
}
}
if (nDevices == 0) Serial.println("No I2C devices found.");
else Serial.println("Scan complete.");
delay(5000); // Repeat scan every 5 seconds
}
I get an output saying no devices found. After researching about it, I found that the sensor is not enabled. How do I enable the sensor and make it work.
Connections:
X_NUCLEO-53L5A1 ESP8266
SCL GPIO 5
SDA GPIO 4
3V3 3V3
GND GND
Please help me I am totally new to this. Thanks in advance.
Solved! Go to Solution.
2025-04-02 7:04 AM
There are lots of things that can go wrong - but it's after you start talking to the chip. If you cannot even find it, you have one of two issues. 1) no power or 2) your LPn line is low. I suppose you might have the clock and data pins backward - but that's pretty much it.
There are 2 processors in the sensor. One does the ranging, the other does the I2C interface.
It's really hard to stop the I2C from working. That bit of IP has been around for a really long time. It works.
So double check. You have a hardware error.
- john
2025-04-02 7:04 AM
There are lots of things that can go wrong - but it's after you start talking to the chip. If you cannot even find it, you have one of two issues. 1) no power or 2) your LPn line is low. I suppose you might have the clock and data pins backward - but that's pretty much it.
There are 2 processors in the sensor. One does the ranging, the other does the I2C interface.
It's really hard to stop the I2C from working. That bit of IP has been around for a really long time. It works.
So double check. You have a hardware error.
- john
2025-04-02 7:28 AM - edited 2025-04-02 7:32 AM
Do I need to configure anything using the NUCLEO-F4014E and software, because I saw many posts using the NUCLEO-F4014E board.
2025-04-02 7:28 AM
Thank you John, I will surely check on it.
2025-04-02 9:54 PM
I made the LPn high and now the sensor is being detected. Thank you John.