2025-12-21 10:03 PM - last edited on 2025-12-22 1:42 AM by Andrew Neil
Hi Team,
In this post regarding VL6180x proximity sensor, the sensor is detecting the address(0x29) but the readings are receiving as 255 value even the object it detected in front of sensor. for reference purpose go through this code snippet wrote in arduino IDE for ESP32-WROVER-IE.
What might be the problem?
Regards,
#include <Wire.h>
#include "Adafruit_VL6180X.h"
#define SDA 23
#define SCL 22
Adafruit_VL6180X vl;
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println("Starting I2C...");
Wire.begin(SDA, SCL);
delay(100);
Serial.println("VL6180X test");
if (!vl.begin()) {
Serial.println("Failed to find VL6180X");
while (1);
}
Serial.println("VL6180X found!");
}
void loop() {
//Serial.println("hi");
uint8_t range = vl.readRange();
uint8_t status = vl.readRangeStatus();
// if (status == VL6180X_ERROR_NONE) {
Serial.print("Range: ");
Serial.println(range);
//}
//delay(500);
}Edited to apply source code formatting - please see How to insert source code for future reference.
2025-12-21 10:09 PM - edited 2025-12-21 10:10 PM
I am very sorry to inform you that this is a device that has already been discontinued, and STMicroelectronics has no further information about it. But perhaps one of our friendly community users will be able to help?
Regards
/Peter
2025-12-22 1:09 AM - edited 2025-12-22 1:54 AM
Can you please suggest me the any another proximity sensor with this SAME FOOTPRINT? and also may i know the date of this product discontinue?
2025-12-22 4:41 AM
The VL62180 was the one of the first sensors of its kind launched by STMicroelectronics and has features, such as the ambient light sensor, that are no longer included in later generations. In addition to the significant expansion of functionality and range, the package has also been changed, meaning that unfortunately there is no p2p replacement.
Regards
/Peter
2025-12-30 2:03 PM
Peter is right, so making a new design with this sensor is silly. If you want a sensor with similar capability - have a look at the VL53L4CD. That is a part that is easy to use, has great documentation and really does work better.
But if you are a hobbyist or student, and you just want to get this working, you missed a step.
You really have to initialize the sensor by sending it about 20 or 30 bytes of data and then telling the sensor to 'start'. It's a write command to the 'go' register.
Easiest thing to do is go to GitHub and look for working code. There is quite a bit. Find a project that works and do what they did. You might even find a project with your same MCU.
- good luck
- john