VL53L1X with Pico W

I am using the example code through Arduino IDE. I have loaded “ContinuousWithDetails”. I am currently getting the error “Failed to detect and initialize sensor!”. So the initialization isn’t working.

I thought I must have broken the sensor, but I bought a 2nd one, and that is also not working. So I must be connecting it wrong?

The Pico W is connected to my Ubuntu desktop through USB. I have also used two different cables (that I also use for debugging Android Apps, so those should be no issue).

I can run other sketches on the Pico W, such as WLAN scanning, and blinking the LED.

Can you see anything wrong?

I noticed changes in the timeout did not do anything. So I edited the library to debug where it could be breaking. It seems like readReg16Bit(IDENTIFICATION__MODEL_ID) is returning 0xFFFF instead of 0xEACC.

Hello.

That is not the correct way to use your headers. To ensure good electrical connections, you should insert the short side of the header through the plated holes on your boards and solder them, then plug the jumper wires fully onto the long side of the headers. Here is link to a picture showing a properly soldered header on the VL53L1X carrier (the long sides of the header pins are plugged into the breadboard), and here is a link to the Adafruit Guide to Excellent Soldering which is a useful reference.

If you make those changes and continue having trouble, please post some pictures of your updated connections.

- Patrick

Thank you for the quick reply! I thought that I could use the cables “loose” like that to prototype. I have soldered the connections as instructed:

Here are how the connectors look with the cables connected:

Unfortunately, I am getting the same error.

Also tried in a breadboard.

I moved the jumpers to GP4 and GP5 (according to this chart: https://datasheets.raspberrypi.com/picow/PicoW-A4-Pinout.pdf) since I noticed the “default” I2C pins are there.

After I did that, and soldered the new connections, it worked great.

Thank you for your support!

I’m glad to hear you got it working! Thanks for letting us know.

By the way, I strongly recommend you solder all of the header pins, including the ones you are not actively using.

- Patrick

1 Like