cancel
Showing results for 
Search instead for 
Did you mean: 

VL6180X I2C adddress detecting but readings are not coming.

Ajay_9121
Associate III

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.

3 REPLIES 3
Peter BENSCH
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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?

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.