# VL53L5CX not working with Raspberry Pi Pico

**URL:** <https://community.sparkfun.com/t/vl53l5cx-not-working-with-raspberry-pi-pico/44231>\
**Category:** Distance\
**Created:** [July 20, 2022, 9:54pm UTC](https://community.sparkfun.com/t/vl53l5cx-not-working-with-raspberry-pi-pico/44231 "2022-07-20T21:54:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![roflrolf](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@roflrolf](https://community.sparkfun.com/u/roflrolf)\
**Post date:** [July 20, 2022, 9:54pm UTC](https://community.sparkfun.com/t/vl53l5cx-not-working-with-raspberry-pi-pico/44231/1 "2022-07-20T21:54:59Z")

</div>

Hey,

I’m trying to use the VL53L5CX ( [https://learn.sparkfun.com/tutorials/qw … okup-guide](https://learn.sparkfun.com/tutorials/qwiic-tof-imager---vl53l5cx-hookup-guide) ) with a Raspberry Pi Pico. The VL53L5CX is connected to the boards 3.3V supply (power LED is on) and SDA and SCL are connected to GPIO 4 & 5. I am programming the Pico with the Arduino IDE with the official Arduino Mbed OS RP2040 board platform.

If I run the Example1\_DistanceArray, the code gets stuck at myImager.begin(). If I run an i2c scan ( [https://playground.arduino.cc/Main/I2cScanner/](https://playground.arduino.cc/Main/I2cScanner/) ) it gets stuck at Wire.endTransmission(). If I disconnect the i2c wires, the programs don’t get stuck and instead report no device found.

With the same setup I am able to discover and connect to a VL53L4CX ( [https://learn.adafruit.com/adafruit-vl5 … or/arduino](https://learn.adafruit.com/adafruit-vl53l4cx-time-of-flight-distance-sensor/arduino) ).

I also tried a community board platform (Arduino-Pico [https://github.com/earlephilhower/arduino-pico](https://github.com/earlephilhower/arduino-pico) ), with that no i2c device was found.

---

<div class="post-metadata">

**Author:** ![TS-Russell](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/ts-russell/32/6092_2.png) [@TS-Russell](https://community.sparkfun.com/u/TS-Russell)\
**Post date:** [July 20, 2022, 11:59pm UTC](https://community.sparkfun.com/t/vl53l5cx-not-working-with-raspberry-pi-pico/44231/2 "2022-07-20T23:59:54Z")

</div>

Does it behave differently with the regular Arduino IDE (non-web version)?

---

<div class="post-metadata">

**Author:** ![roflrolf](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@roflrolf](https://community.sparkfun.com/u/roflrolf)\
**Post date:** [July 21, 2022, 7:53pm UTC](https://community.sparkfun.com/t/vl53l5cx-not-working-with-raspberry-pi-pico/44231/3 "2022-07-21T19:53:28Z")

</div>

I initially tried it with the regular IDE. I now also tried the web IDE and the i2c scan also got stuck at the same line.

---

<div class="post-metadata">

**Author:** ![roflrolf](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@roflrolf](https://community.sparkfun.com/u/roflrolf)\
**Post date:** [July 26, 2022, 10:15am UTC](https://community.sparkfun.com/t/vl53l5cx-not-working-with-raspberry-pi-pico/44231/4 "2022-07-26T10:15:39Z")

</div>

I found other arduino issues on the web where the wire library would get stuck at endTransmission(). In the reported cases, it was related to noise on the transmission or not matching pull-up resistors. Can this be the case here? My cables are 15 cm long, so I don’t think it’s noise.

---

<div class="post-metadata">

**Author:** ![roflrolf](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@roflrolf](https://community.sparkfun.com/u/roflrolf)\
**Post date:** [August 2, 2022, 6:43pm UTC](https://community.sparkfun.com/t/vl53l5cx-not-working-with-raspberry-pi-pico/44231/5 "2022-08-02T18:43:58Z")

</div>

I think I received a faulty unit. There is \<1 Ohm between SDA and SCL. Probing SDA and SCL with an oscilloscope also shows weird signals. The idle voltage is pulled low and if only one connection is present, the same signal is also on the other (not connected) line (which made me discover the short between the lines).

---

<div class="post-metadata">

**Author:** ![roflrolf](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@roflrolf](https://community.sparkfun.com/u/roflrolf)\
**Post date:** [August 18, 2022, 3:57pm UTC](https://community.sparkfun.com/t/vl53l5cx-not-working-with-raspberry-pi-pico/44231/6 "2022-08-18T15:57:59Z")

</div>

Can please somebody confirm that there should not be a short between SDA and SCL?

---

<div class="post-metadata">

**Author:** ![paulvha](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@paulvha](https://community.sparkfun.com/u/paulvha)\
**Post date:** [August 18, 2022, 4:33pm UTC](https://community.sparkfun.com/t/vl53l5cx-not-working-with-raspberry-pi-pico/44231/7 "2022-08-18T16:33:15Z")

</div>

I do not have a sensor like yours, but I do have a VL53L1X (SEN-14722) and your results look wrong to me. A cold measurement (between SCL and SDA) gives me 4.4K. This makes sense given the 2 pullup resistors of 2.2K to 3.3V. Check that your pull-up resistors are really 2.2K as well.

---

<div class="post-metadata">

**Author:** ![roflrolf](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@roflrolf](https://community.sparkfun.com/u/roflrolf)\
**Post date:** [August 18, 2022, 4:42pm UTC](https://community.sparkfun.com/t/vl53l5cx-not-working-with-raspberry-pi-pico/44231/8 "2022-08-18T16:42:51Z")

</div>

Yes the pull up is 2.2 kOhm

---

<div class="post-metadata">

**Author:** ![paulvha](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@paulvha](https://community.sparkfun.com/u/paulvha)\
**Post date:** [August 18, 2022, 5:05pm UTC](https://community.sparkfun.com/t/vl53l5cx-not-working-with-raspberry-pi-pico/44231/9 "2022-08-18T17:05:18Z")

</div>

if you still (cold) measure \<1 ohm between SDA and SCL… Either there is a bad solder connection causing a short circuit or the chip is broken.
